WordPress:Template Tags/permalink anchor
来自站长百科
描述[ ]
产出一篇文章的permalink anchor标识符或者id (<a id="....),对于链接到一个拥有几篇文章的网页,如归档网页上,这很有用。必须在The Loop内使用这个标签。
用法[ ]
%%% <?php permalink_anchor('type'); ?> %%%
例子[ ]
将permalink anchor插入到文章标题的旁边。
<h3><?php permalink_anchor(); ?><?php the_title(); ?></h3>
参数[ ]
- type
- (string) 要输出的anchor。有效的参数值是:
- 'id' - Anchor等同与文章ID数字。这是默认的。
- 'title' - Anchor 等同于文章名,例如 文章 slug。