WordPress:Template Tags/single post title

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

Description

描述

Displays or returns the title of the post when on a single post page (permalink page). This tag can be useful for displaying post titles outside WordPress:The Loop.

当在一个只有一篇文章的网页上时(permalink 网页),显示或者返回文章标题。对于在The Loop外显示文章标题,这个标签非常有用。

Usage

用法

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

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

Example

例子

<h2><?php single_post_title('Current post: '); ?></h2>
Current post: Single Post Title

<h2><?php single_post_title('Current post: '); ?></h2>

当前文章:单一的文章的标题

Parameters

参数

prefix
(string) Text to place before the title. Defaults to ''.

;前缀:(string)标题之前放置的文本。默认为''

display
(boolean) Should the title be displayed (TRUE) or returned for use in PHP (FALSE). Defaults to TRUE.

;显示:(boolean)标题应该显示(正确的)还是返回用在PHP中(错误的)。默认为正确的

Related

相关的

模板:Tag Post Tags

模板:PHP Function Tag Footer the_ID, the_title, the_title_attribute, single_post_title, the_title_rss, the_content, the_content_rss, the_excerpt, the_excerpt_rss, previous_post_link, next_post_link, posts_nav_link, the_meta,