has_term Wordpress function


Description:

Check if the current post has any of given terms.


Syntax:


Arguments:

(string|int|array) $term Optional. The term name/term_id/slug or array of them to check for.
(string) $taxonomy Taxonomy name
(int|object) $post Optional. Post to check instead of the current post.


Return Type:

(bool) True if the current post has any of the given tags (or any tag, if no tag specified).


Define At:

wp-includes/category-template.php


Wordpress Reference URL:

http://codex.wordpress.org/Function_Reference/has_term


0 Flares Facebook 0 Google+ 0 0 Flares ×
Posted in: Wordpress functions
0 Flares Facebook 0 Pin It Share 0 Google+ 0 0 Flares ×