single_tag_title()
single_tag_title( string $prefix = ”, bool $display = t…
single_tag_title( string $prefix = ”, bool $display = true )
显示或检索标签贴存档的页面标题。
Display or retrieve page title for tag post archive.
显示或检索标签贴存档的页面标题。
Display or retrieve page title for tag post archive.
目录锚点:#说明#参数#源码#笔记
说明(Description)
对于用于显示标记页标题的标记模板文件非常有用。前缀不会自动在前缀之间放置空格,因此如果应该有空格,则参数值将需要在其末尾。
参数(Parameters)
| 参数 | 类型 | 说明 |
|---|---|---|
| $prefix | (string) | 标题前显示的内容。 |
| $display | (bool) | 是显示还是检索标题。 |
源码(Source)
/**
* Display or retrieve page title for tag post archive.
*
* Useful for tag template files for displaying the tag page title. It has less
* overhead than {@link wp_title()}, because of its limited implementation.
*
* It does not support placing the separator after the title, but by leaving the
* prefix parameter empty, you can set the title separator manually. The prefix
* does not automatically place a space between the prefix, so if there should
* be a space, the parameter value will need to have it at the end.
*
* @since 2.3.0
*
* @param string $prefix Optional. What to display before the title.
* @param bool $display Optional, default is true. Whether to display or retrieve title.
* @return string|void Title when retrieving.
*/
function single_tag_title( $prefix = '', $display = true ) {
return single_term_title( $prefix, $display );
}| 更新版本 | 源码位置 | 使用 | 被使用 |
|---|---|---|---|
| 2.3.0 | wp-includes/general-template.php | 14 | 20 |
笔记(Notes)
此示例显示文本“Currently browsing”,后跟标记标题。
类别:WordPress 函数手册、
本文收集自互联网,转载请注明来源。
如有侵权,请联系 wper_net@163.com 删除。

还没有任何评论,赶紧来占个楼吧!