WordPress:Template Tags/permalink anchor

来自站长百科
Fludlen讨论 | 贡献2008年7月9日 (三) 13:55的版本
跳转至: 导航、​ 搜索

Description

描述

Outputs a permalink anchor identifier or id (<a id="....) for a post. This is useful for linking to a particular post on a page displaying several posts, such as an archive page. This tag must be within WordPress:The Loop.

产出一篇文章的permalink anchor标识符或者id (<a id="....),对于链接到一个拥有几篇文章的网页,如归档网页上,这很有用。必须在The Loop内使用这个标签。

Usage

用法

%%% <?php permalink_anchor('type'); ?> %%%

%%% <?php permalink_anchor('type'); ?> %%%

Example

例子

Inserts the permalink anchor next to a post's title. 将permalink anchor插入到文章标题的旁边。

<h3><?php permalink_anchor(); ?><?php the_title(); ?></h3>

<h3><?php permalink_anchor(); ?><?php the_title(); ?></h3>

Parameters

参数

type
(string) Type of anchor to output. Valid values are:

;类型:(string)要输出的anchor。有效的参数值是:

  • 'id' - Anchor equals numeric post ID. This is the default.
  • 'id' -Anchor等同与文章ID数字。这是默认的。
  • 'title' - Anchor equals postname, i.e. post slug.
  • 'title' - Anchor 等同于文章名,例如 文章 slug

Related

模板:Tag Permalink Tags

模板:Tag Footer

相关的

模板:标签Permalink标签

模板:标签页底文字