• Resolved apodtoo

    (@apodtoo)


    Hello!

    The title pretty much says it all. I’m using WordPress as a CMS. I want posts in Categories X, Y & Z to display their featured post thumbnails (easy – I got that nailed down no problem), but posts that belong to Categories A & B NOT to display their featured post thumbnails. I’ve tried writing a number of different IF statements and they’re displaying all or none. Any ideas where I might be going wrong?

    Thanks!

Viewing 1 replies (of 1 total)
  • Thread Starter apodtoo

    (@apodtoo)

    <?php if (in_category(array('20', '21')) ) : ?>
            <div class="post-photo">
            <?php the_post_thumbnail(); ?>
            </div>
        <?php endif; ?>
Viewing 1 replies (of 1 total)
  • The topic ‘Display Post Thumbnail only if Post belongs to a particular Category’ is closed to new replies.