• steponafish

    (@steponafish)


    Hello, I’m trying to query custom post-type categories and also have an IF statement. EXAMPLE: IF the category == “Case Studies” – show an image on top of the posted thumbnail. But I can’t seem to get it working. I have this little snippet of code that has worked, but only if the category “Case Study” is the only thing on the page.

    <?php
    if (($term !== ‘Case Studies’) && ($term !== ‘case-studies’) ){
    } else { ?>
    <span class=”ribbon”></span><span class=”ribbon_icon”></span>
    <? } ?>

    Can any one help me?

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

    (@steponafish)

    I just thought of something… Could I use something like…

    $terms = is_tax( ‘TAXOMONY-NAME’ );
    if($terms == ‘case-studies’) { SHOW IMAGE }

Viewing 1 replies (of 1 total)
  • The topic ‘Post Type Category Query with an If Statement for a specific category’ is closed to new replies.