has_tag()

Sponsored Link

現在の投稿タグの場合です。ループ内で使用しなければなりません。注:has_tagは、バージョン2.6から追加されました。

Sponsored Link

原文(翻訳元)When the current post has a tag. Must be used inside The Loop. Note: has_tag was added at Version 2.6.

has_tag(‘mild’)

現在の投稿が’mild’タグである場合です。

原文(翻訳元)When the current post has the tag ‘mild’.

has_tag(array(‘sharp’,’mild’,’extreme’))

現在の投稿が配列内の全てのタグである場合です。

原文(翻訳元)When the current post has any of the tags in the array.

is_archive()とタグテンプレートを参照してください。

原文(翻訳元)See also is_archive() and Tag Templates.

Sponsored Link