Forums

[resolved] is_category fuction for custom taxonomie's terms (5 posts)

  1. Machi
    Member
    Posted 1 year ago #

    Hi there,
    I'm trying to find a conditional tag for recognizing the opened term of custom taxonomy. Let's say I have a taxonomy "map" and I'm browsing the taxonomy's term called 'USA' with ID 50. Is there something like deprecated is_term?

    Like:

    <?php if(is_term(50, 'map')) : ?>
    ...
    <?php endif; ?>

    Thanks a lot...

  2. Machi
    Member
    Posted 1 year ago #

    Nobody know a solution to this please?

    Thanks a lot...

  3. Machi
    Member
    Posted 1 year ago #

    Well, I've just found this out myself... to use conditional tags of terms in custom taxonomies use is_tax() function like this:

    <?php elseif(is_tax('custom-taxonomy', $term = 'custom-term')) : ?>
    ...
    <?php endif; ?>
  4. henriquepalazzo
    Member
    Posted 1 year ago #

    Thanks Machi! I was looking for the same solution!

  5. leselecta
    Member
    Posted 1 year ago #

    Thank you!

Topic Closed

This topic has been closed to new replies.

About this Topic