single_term_title()

介绍

返回当前页面标题。

使用

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

参数

$prefix
(string) (optional) Text to output before the title.
Default: None
Note: The $prefix argument is currently ignored if the $display argument is false.
See http://core.trac.wordpress.org/ticket/16632

$display
(boolean) (optional) Display the title (TRUE), or return the title to be used in PHP (FALSE).
Default: TRUE

示例

在标题前显示"Currently browsing "

<p><?php single_term_title('Currently browsing '); ?>.</p>

显示结果

Currently browsing WordPress.

发表评论

电子邮件地址不会被公开。 必填项已用*标注