Hide featured image if post format is gallery
-
Currently creating a custom base theme, on single.php I am showing the featured image at the default 150px x 150px size, it is right aligned within the post.
My code looks like this:
<?php if ( has_post_thumbnail() ) { $large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'big-thumb' ); echo '<a rel="lightbox" href="' . $large_image_url[0] . '" title="' . the_title_attribute( 'echo=0' ) . '">'; the_post_thumbnail( 'thumbnail', array( 'class' => 'post-thumb' ) ); echo '</a>'; } ?> <?php the_content(); ?>
However I want to place a statement to hide the post_thumbnail IF the post format is gallery. What would I add to either the content-single.php or functions file?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Hide featured image if post format is gallery’ is closed to new replies.