WordPress 中文文档

Function Reference/the title

出自WordPress Chinese 中文文档

跳转到: 导航, 搜索

wordpress.org.cn

目录

Description

Displays or returns the title of the current post. This tag must be within The Loop. If the post is protected or private, this will be noted by the words Protected: or Private: prepended to the title.

Usage

%%% ?php the_title( $before, $after, $display ); ? %%%

Parameters

$before 
(string) Text to place before the title. Defaults to tt#39;#39;/tt.
$after 
(string) Text to place after the title. Defaults to tt#39;#39;/tt.
$display 
(Boolean) Display the title (ttTRUE/tt) or return it for use in PHP (ttFALSE/tt). Defaults to ttTRUE/tt.

Example

?php the_title('lt;h3gt;', 'lt;/h3gt;'); ?

Notes

Change Log

Since: 0.71

Source File

ttthe_title()/tt is located in onlyincludecodewp-includes/post-template.php/code/onlyinclude

div class=template-description style=padding: 0 1.5em; border: 1px solid #eeeeee; background-color: #f9f9f9

Template Description

Link to the source code on http://core.trac.wordpress.org/browser/.

Parameters

  1. filename
  2. (option) path to codetag/code (version) or codetrunk/code. This option is only used for a new function.br /Default: codetrunk/code -- trunk is the latest bleeding edge development version of WordPress.

Usage

Link to the stable version: pre已侦测回归模板: Template:Trac/pre

Link to trunk: pre已侦测回归模板: Template:Trac/pre

/div

wordpress.org.cn.

Related

body_class, next_image_link, next_post_link, next_posts_link, post_class, post_password_required, posts_nav_link, previous_image_link, previous_post_link, previous_posts_link, single_post_title, sticky_class, the_category, the_category_rss, the_content, the_content_rss, the_excerpt, the_excerpt_rss, the_ID, the_meta, the_shortlink, the_tags, the_title, the_title_attribute, the_title_rss, wp_link_pages

includeonlydiv style=clear:both; background-color:#F7F7F7; border:1px solid #CCCCCC; color:#000000; padding:7px; margin:0.5em auto 0.5em auto; vertical-align:middle;See also index of Function Reference and index of Template Tags./div/includeonlynoinclude

Description

This Template is used by Codex:Template Messages.

Usage

pre 已侦测回归模板: Template:Message /pre

Result

已侦测回归模板: Template:Message

/noinclude

wordpress