tag_description

Sponsored Link

WordPressバージョン2.8で最初に利用可能になりました。このテンプレートタグはタグの説明を返します。タグIDは、パラメーターとして渡す事が出来ますが、ないタグIDが渡された場合、現在のクエリーしたタグの説明を返すでしょう。

Sponsored Link

First available with WordPress Version 2.8, this template tag returns the description of a tag. A tag ID can be passed as a parameter, but if no tag ID is passed, the description current queried tag will be returned.

tag_descriptionのテンプレートタグ使用方法

<?php tag_description( $tagID ); ?> 

デフォルトの使い方

デフォルトの使い方は、現在のクエリータグの説明を返します。

The default usage returns the description of the current queried tag.

<?php $tag_descr = tag_description(); ?>

tag_descriptionのパラメーター

$tagID

(string) (optional) 説明を返すタグのIDです。

(string) (optional) The ID of the tag to return a description.

デフォルト:現在のクエリータグの説明を返します。

Default: return description of current query tag

ID28のタグの説明を表示します。

Displays a description of the tag id 28.

<?php echo 'Tag Description: ' . tag_description('28'); ?> 

変更ログ

Since: 2.8.0

関連テンプレートタグ

the_tags, tag_description, single_tag_title, wp_tag_cloud, wp_generate_tag_cloud, get_tags, get_the_tags, get_the_tag_list, get_tag_link

Sponsored Link