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
Any thoughts? Thanks!
- The topic ‘Conditional statement for template file’ is closed to new replies.