an
groups-icon

How to check if post have the taxonomy (listing category) ?

Wait a minute... This content is very very old. We no longer sell or support this theme version. New Topics
  • Version 9
    Mariusz Wajda
    0 points
    Beginner

    Hi
    I try to do something like that:
    in the loop “if post have this taxonomy(listing category) then do my code ” i used codes below in diferent configurations but does not work:
    [code title=””]<?php if ( wp_get_post_terms( $post->ID, THEME_TAXONOMY) == (‘term=144’)) { ?>
    <span>my code</span>
    <?php } ?>[/code]

    or

    [code title=””]<?php if ( wp_get_post_terms( $post->ID, THEME_TAXONOMY) == ‘the listing category slug or ID’) { ?>
    <span>my code</span>
    <?php } ?>[/code]

    Please, can anyone give me some advice ???

    August 9, 2015 at 4:28 pm
  • Mark Eting
    0 points
    Beginner
    Members Only Content

    This reply is for PremiumPress customers only.

    Login Now
    August 9, 2015 at 5:16 pm
  • Mariusz Wajda
    0 points
    Beginner
    Members Only Content

    This reply is for PremiumPress customers only.

    Login Now
    August 9, 2015 at 5:54 pm

505

Views

2

Replies