WordPress.org

Support

Support » Plugins and Hacks » Conditional statement for template file

Conditional statement for template file

  • I’m using Cyclone sliders on my archive pages as follows:

    <div class="slideshow">
    <?php echo do_shortcode('[cycloneslider id="'.$category_name.'-slideshow"]') ?>
    </div>

    However, some archive pages won’t have slideshows, so I need to test to see if there are any slideshows matching the current category. Something like:

    If ‘.$category_name.’-slideshow is defined
    echo do shortcode
    else
    nothing

    Any thoughts? Thanks!

    http://wordpress.org/extend/plugins/cyclone-slider/

  • The topic ‘Conditional statement for template file’ is closed to new replies.