Neo
Neo

Reputation: 16219

How do I check tag_ID in wordpress php code?

I can check page_id like below in header.php file

<?php if (!is_page('792')) { ?>

***** The Header Code is HERE *****

<?php } ?>

But if I tried to check tag_ID in same manner it is giving me error

<?php if (!tag_ID('121')) { ?>
    
    ***** The Header Code is HERE *****
    
    <?php } ?>

ERROR

Fatal error: Call to undefined function tag_ID()

Basically I want to hide HEADER section so it is working perfect on page but not on tag_id

Upvotes: 0

Views: 1204

Answers (1)

eggyal
eggyal

Reputation: 125835

tag_ID() is not a defined WordPress function. You want is_tag().

Upvotes: 1

Related Questions