模板标签-the_title_attribute()

0条评论

说明

该标签显示或返回当前文章的标题。在一定程度上与the_title() 功能一致,但该标签剥离了标题的HTML标签并将若干字符(包括引号)转换为相应的字符实体,从而给出了一个更为“简洁”的标题;该标签还使用了查询字符串类型的参数。该标签必须在WordPress主循环(loop)

用法

<?php the_title_attribute('arguments'); ?> 

示例

<?php the_title_attribute('before=<h3>&after=</h3>'); ?>  


参数

before

(字符串)放在标题前的文本。默认为''。

after

(字符串)放在标题前的文本。默认为''。

echo

(布尔型)回应标题(1)或返回标题以用在PHP中(0)。默认值为1。

历史记录

  • 始见于WordPress 2.3.0版本

注释

发表新评论

此内容将保密,不会被其他人看见。
  • 自动将网址与电子邮件地址转变为链接。
  • 允许HTML标签:<a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • 自动断行和分段。

更多关於格式化选项的信息

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.