Wordpress Document

Tag Categories

Author tags

Category tags

Comment tags

Date and Time tags

General tags

Geo tags

Link tags

Links Manager tags

Permalink tags

Post tags

Trackback tags

WP/PHP General

Category tags

カテゴリー情報の表示を行います

the_category('separator', 'parents')

表示中の投稿を含むカテゴリーへのリンクを表示します

separator: (string)
parents: (string)

the_category_rss('type')

表示中の投稿を含むカテゴリーをRSSとして表示します

type: 'rss' | 'rdf'

the_category_ID(echo)(非推奨)

表示中の投稿を含むカテゴリーID(数字)を表示します

echo : (boolean)

the_category_head('before', 'after')(非推奨)

表示中のカテゴリー名が前のカテゴリー名と異なる場合、それを表示します

befor : (string)
after : (string)

single_cat_title('prefix', display)

現在のページのカテゴリータイトルを表示します

prefix : (string)
display : (boolean)

category_description(category_id)

カテゴリー詳細を返します

category_id : (integer)

-

-

セレクトフィールドにカテゴリー一覧を表示します

optionall : (boolean) default: TRUE
'all' : (string)
sort_column : 'ID' | 'name'
sort_order : 'asc' | 'desc'
optiondates : (boolean) default: FALSE
optioncunt : (boolean) default: FALSE
hide_empty : (boolean) default: TRUE
optionnone : (boolean) default: FALSE
selected : (integer)
hide : (integer)

wp_list_categories('option=value')(version 2.1)

カテゴリー一覧をリンクで表示します

show_option_all : (boolean) default: FALSE
orderby : 'ID' | 'name'
order : 'asc' | 'desc'
style : 'TBA'
show_count : (boolean) default: FALSE
hide_empty : (boolean) default: TRUE
use_desc_for_title : (boolean) default: TRUE
child_of : (integer)
feed : (string)
feed_image : (string)
exclude : (string)
hierarchical : (boolean) default: TRUE
title_li : (boolean) default: FALSE

list_cats(optionall, 'all', 'sort_column', 'sort_order', 'file', list, optiondates, optioncount, hide_empty, use_desc_for_title, children, child_of, 'Categories', recurse, 'feed', 'feed_img', 'exclude', hierarchical)(2.1で非推奨)

カテゴリー一覧をリンクで表示します

show_option_all : (boolean) default: FALSE
orderby : 'ID' | 'name'
order : 'asc' | 'desc'
style : 'TBA'
show_count : (boolean) default: FALSE
hide_empty : (boolean) default: TRUE
use_desc_for_title : (boolean) default: TRUE
child_of : (integer)
Categories : (integer)
recurse : (boolean) default:
feed : (string)
feed_image : (string)
exclude : (string)
hierarchical : (boolean) default: TRUE

wp_list_cats('option=value'(2.1で非推奨)

カテゴリー一覧をリンクで表示します

optionall : (boolean) default: FALSE
'all' : (string)
'sort_column' : 'ID' | 'name'
'sort_order' : 'asc' | 'desc'
'file' : (string)
list : (boolean) default: TRUE
optiondates : (string) | (boolean) default: FALSE
optioncount : (boolean) default: TRUE
hide_empty : (boolean) default: TRUE
use_desc_for_title : (boolean) default: TRUE
children : (boolean) default: TRUE
child_of : (integer)
feed : (string)
feed_image : (string)
exclude : (string)
hierarchical : (boolean) default: TRUE

in_category(category_id)

現在の投稿が指定されたカテゴリーに属せばtrueを返します

category_id : (integer)

get_category_parents(category, display_link, 'separator', name)

ID順に並べ替えられた親カテゴリーの一覧を返します

category : (integer) default (current category)
display_link : (boolean) default: ?
'separator' : (string)
name : (boolean) default: FALSE

カテゴリーIDに対応するURLを返します

category_id : (numeric)

get_the_category()

カテゴリーオブジェクトを配列で返します

-