has_tag [ WordPress Function ]
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Check if the current post has any of given tags.
The given tags are checked against the post's tags' term_ids, names and slugs. Tags given as integers will only be checked against the post's tags' term_ids. If no tags are given, determines if post has any tags.
Prior to v2.7 of WordPress, tags given as integers would also be checked against the post's tags' names and slugs (in addition to term_ids) Prior to v2.7, this function could only be used in the WordPress Loop. As of 2.7, the function can be used anywhere if it is provided a post ID or post object.
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- Function Reference/has tag « WordPress Codex
Description. Check if the current post has any of the given tags. The given tags are checked against the post's tags' term_ids, names and slugs. Tags given as ...
codex.wordpress.org - Conditional Tags « WordPress Codex
Must be used inside The Loop. has_tag( 'mild' ): When the current post has the tag 'mild'. has_tag( array( 'sharp', 'mild', 'extreme' ) ): When the current post has ...
codex.wordpress.org - WordPress › Support » Using has_tag to display certain information
[resolved] Using has_tag to display certain information (8 posts). David Member Posted 1 ... <li class="occupation">Occupation: <?php if(has_tag('Actress')){ ?> ...
wordpress.org - has_tag WordPress plugin | Ninja Monkeys!
Update: Function has been added in Wordpress 2.6, so use this plugin if you're stuck on 2.3-2.5. The Has Tag WordPress plugin lets you call has_tag($tag) in.
ninjamonkeys.co.za
Gebruikersdiscussies [ wordpress.org ]
- adim32 on "has_tag Help"
- keesiemeijer on "Issue with is_home() condition on WP 3.3"
- eva-MyClientIsRich on "Issue with is_home() condition on WP 3.3"
- keesiemeijer on "Issue with is_home() condition on WP 3.3"
- eva-MyClientIsRich on "Issue with is_home() condition on WP 3.3"
- keesiemeijer on "Issue with is_home() condition on WP 3.3"
- eva-MyClientIsRich on "Issue with is_home() condition on WP 3.3"
- keesiemeijer on "Issue with is_home() condition on WP 3.3"
- eva-MyClientIsRich on "Issue with is_home() condition on WP 3.3"
- keesiemeijer on "Issue with is_home() condition on WP 3.3"