介绍
post_type_archive_title()
是自定义文章类型 post type 的archive页面标题。显示 archive.php 和 archive-{posttype}.php 页面标题。
使用
<?php post_type_archive_title( $prefix, $display ); ?>
参数
$prefix
(string) (optional) What to display before the title
Default: None
$display
(bool) (optional) Whether to display or retrieve title
Default: true
返回值
(string)
Title when retrieving, null when displaying or failure.
示例
显示自定义文章类型的archive标题。
<h1><?php post_type_archive_title(); ?></h1>