I'm trying to find out whether the post has_term
by post ID or not.
Right now I have this:
<?php $postid = $_GET['post_id'];
if( has_term( 'campaign', 'type' ) ): ?>
//Do something
<?php endif; ?>
How do I incorporate $postid variable inside the has_term
?
So that I could check only that specific post id.
I have tried:
<?php $postid = $_GET['post_id'];
if( has_term($postid, 'campaign', 'type' ) ): ?>
The above doesn't work.
Need help, thanks.