get_cat_name

Sponsored Link

IDからカテゴリー名を返します。

Sponsored Link

Retrieve the name of a category from its ID.

get_cat_nameのファンクションタグ使用方法

<?php get_cat_name( $cat_id ) ?>

get_cat_nameのパラメーター

$cat_id

(integer) (required) カテゴリーID。
デフォルト:なし

(integer) (required) Category ID
Default: None

戻り値

(string)
カテゴリー名

(string)
Category name

<?php echo get_cat_name(4);?>

‘4’のIDのカテゴリー名を返します。

returns the name for the category with the id ‘4’.

注意

変更ログ

Since: 1.0.0

ソースファイル

get_cat_name()は、wp-includes/category.php内に位置しています。

get_cat_name() is located in wp-includes/category.php.

Sponsored Link