WordPress:Template Tags/single tag title

来自站长百科
Fludlen讨论 | 贡献2008年7月10日 (四) 16:32的版本
跳转至: 导航、​ 搜索

Description

描述

Displays or returns the tag title for the current page. 显示或者返回当前网页的标签标题。

Usage

用法

%%% <?php single_tag_title('prefix', 'display'); ?> %%%

%%% <?php single_tag_title('prefix', 'display'); ?> %%%

Examples

例子

This example displays the text "Currently browsing " followed by the tag title. 这个例子显示了文本"当前浏览",后面是标签标题。

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


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

当前浏览WordPress。


This example assigns the current tag title to the variable $current_tag for use in PHP.

这个例子将当前的标签标题递交到变数$current_tag,以供在PHP中使用。

<?php $current_tag = single_tag_title("", false); ?>

<?php $current_tag = single_tag_title("", false); ?>

Parameters

参数

prefix
(string) Text to output before the tag title. Defaults to '' (no text).

;前缀:(string)标签标题之前的文本。默认为'' (没有文本)。

display
(boolean) Display the tag's title (TRUE) or return it for use in PHP (FALSE). Defaults to TRUE.

;显示:(boolean)显示标签的标题(正确的)或者将标题返回用于PHP(错误的)。默认为正确的

Related

相关的

模板:Tag Tag Tags

模板:PHP Function Tag Footer


模板:标签标签 标签