Home › Forums › Support › conditional tag for slideshow in hooks › Reply To: conditional tag for slideshow in hooks
April 29, 2016 at 10:30 am
#190409
Tom
Lead Developer
Lead Developer
I’m not sure if the gallery shortcode has an exists function, but if it does it would be something like this:
<?php if ( is_single() ) :
if ( gallery_exists() ) :
echo do_shortcode( '[ gallery shortcode ]' );
elseif ( has_post_thumbnail() ) :
the_post_thumbnail();
endif;
endif; ?>
Note: The above will not work because gallery_exists() is most likely not the function name.
- This reply was modified 8 years, 4 months ago by Tom.