the_title()显示当前文章的标题

目录

描述

Displays or returns the title of the current post. This tag may only be used within The Loop, to get the title of a post outside of the loop use get_the_title. If the post is protected or private, this will be noted by the words "Protected: " or "Private: " prepended to the title.

the_title() 描述

用法

 <?php the_title$before$after$echo ); ?> 

the_title() 用法

参数

$before

(string) (可选) Text to place before the title.

默认值: None

$after

(string) (可选) Text to place after the title.

默认值: None

$echo

(Boolean) (可选) Display the title (TRUE) or return it for use in PHP (FALSE).

默认值: TRUE

the_title() 参数

注意

历史

添加于 版本: 0.71

the_title() 历史

源文件

the_title() 函数的代码位于 wp-includes/post-template.php.

the_title() 源文件

相关