WordPress: Template Tags/the title:修订间差异
来自站长百科
(新页面: == Description == Displays or returns the title of the current post. This tag must be within WordPress:The Loop. == Usage == %%% <?php the_title('before', 'after', display); ?> %%%...) |
无编辑摘要 |
||
第1行: | 第1行: | ||
== Description == | == Description == | ||
== 描述 == | |||
Displays or returns the title of the current post. This tag must be within [[WordPress:The Loop]]. | Displays or returns the title of the current post. This tag must be within [[WordPress:The Loop]]. | ||
显示或者返回当前文章的标题。必须在[[WordPress:The Loop|The Loop]]内使用这个标签。 | |||
== Usage == | == Usage == | ||
== 用法 == | |||
%%% <?php the_title('before', 'after', display); ?> %%% | |||
%%% <?php the_title('before', 'after', display); ?> %%% | %%% <?php the_title('before', 'after', display); ?> %%% | ||
第9行: | 第17行: | ||
== Example == | == Example == | ||
==例子 == | |||
<?php the_title('<h3>', '</h3>'); ?> | |||
<?php the_title('<h3>', '</h3>'); ?> | |||
== Parameters == | == Parameters == | ||
== 参数 == | |||
; before : (''string'') Text to place before the title. Defaults to <tt>''</tt>. | ; before : (''string'') Text to place before the title. Defaults to <tt>''</tt>. | ||
;之前: (''string'')标题之前放置的文本。默认为<tt>''</tt>。 | |||
; after : (''string'') Text to place after the title. Defaults to <tt>''</tt>. | ; after : (''string'') Text to place after the title. Defaults to <tt>''</tt>. | ||
;之后:(''string'')标题之后放置的文本。默认为<tt>''</tt>。 | |||
; display : (''Boolean'') Display the title (<tt>TRUE</tt>) or return it for use in PHP (<tt>FALSE</tt>). Defaults to <tt>TRUE</tt>. | ; display : (''Boolean'') Display the title (<tt>TRUE</tt>) or return it for use in PHP (<tt>FALSE</tt>). Defaults to <tt>TRUE</tt>. | ||
;显示:(''Boolean'')显示标题(<tt>正确的</tt>)或者将标题返回,用在PHP中(<tt>错误的</tt>)。默认为<tt>正确的</tt>。 | |||
== Related == | == Related == | ||
== 相关的== | |||
See also [[WordPress:Template_Tags/the_title_attribute|the_title_attribute()]]. | See also [[WordPress:Template_Tags/the_title_attribute|the_title_attribute()]]. | ||
也看看[[WordPress:Template_Tags/the_title_attribute|the_title_attribute()]]。 | |||
{{Tag Post Tags}} | {{Tag Post Tags}} | ||
{{PHP Function Tag Footer}} | {{PHP Function Tag Footer}} | ||
{{标签文章标签}} | |||
{{PHP函数标签页底文字}} |
2008年7月9日 (三) 15:31的版本
Description
描述
Displays or returns the title of the current post. This tag must be within WordPress:The Loop.
显示或者返回当前文章的标题。必须在The Loop内使用这个标签。
Usage
用法
%%% <?php the_title('before', 'after', display); ?> %%%
%%% <?php the_title('before', 'after', display); ?> %%%
Example
例子
<?php the_title('<h3>', '</h3>'); ?>
<?php the_title('<h3>', '</h3>'); ?>
Parameters
参数
- before
- (string) Text to place before the title. Defaults to ''.
;之前: (string)标题之前放置的文本。默认为''。
- after
- (string) Text to place after the title. Defaults to ''.
;之后:(string)标题之后放置的文本。默认为''。
- display
- (Boolean) Display the title (TRUE) or return it for use in PHP (FALSE). Defaults to TRUE.
;显示:(Boolean)显示标题(正确的)或者将标题返回,用在PHP中(错误的)。默认为正确的。
Related
相关的
See also the_title_attribute().
模板: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,