post_type_archive_title

Sponsored Link

投稿タイプのアーカイブのタイトルを取得・表示します。

これは、投稿タイプのタイトルを表示するためのarchive.phpとarchive-{posttype}.phpテンプレートファイルを最適化します。

Sponsored Link

Display or retrieve title for a post type archive.

This is optimized for archive.php and archive-{posttype}.php template files for displaying the title of the post type.

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

<?php post_type_archive_title( $prefix, $display ); ?>

post_type_archive_titleのパラメーター

$prefix

(string) (optional)タイトルの前に表示するもの。
デフォルト:なし

(string) (optional) What to display before the title
Default: None

$display

(bool) (optional) タイトルを表示または取得するかどうか
デフォルトはtrueです。

(bool) (optional) Whether to display or retrieve title
Default: true

返り値

タイトル取得する際に、表示または失敗するときはnullを返します。

(string)
Title when retrieving, null when displaying or failure.

変更ログ

Since: 3.1.0

ソースファイル

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

post_type_archive_title() is located in wp-includes/general-template.php.

Sponsored Link