WordPress:Template Tags/the title attribute

来自站长百科
Xxf3325讨论 | 贡献2008年7月17日 (四) 11:07的版本
跳转至: 导航、​ 搜索

描述

显示或者返回当前文章的标题。必须在The Loop内使用这个标签。

用法

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

例子

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

参数

before
(string) 标题之前放置的文本。默认为''
after
(string) 标题之后放置的文本。默认为''
echo
(Boolean) Echo the title (1) or return it for use in PHP (0). Defaults to 1.

相关的

也看看the_title()

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,