• I am using cyclone slider in my wordpress header. Some of the pages will not have a slider. I need to write a php if statement to change the css class to alter the height if no slider.

    I’m not sure what to use in my if statement for cyclone slider. Currently I call the slider in a shortcode.
    <?php echo do_shortcode( '[cycloneslider id="'. get_page_uri() . '"]' ); ?>

    If I load a page that doesn’t have an assigned slider it shows a default text “N/A_Default”.

    I tried many variations of this:

    <?php if ( ( $cycloneslider=="N/A_Default") ) { ?>
            <div>Atest</div>
            <?php } else { ?>
            <div>Btest</div>
            <?php } ?>

    Any thoughts?
    This one is really kicking my ass.

    Thanks

  • The topic ‘CycloneSlider Shortcode as part of if statement’ is closed to new replies.