跳到内容

Auto Anchor Links List

v1.0

jethin · 2024年9月25日 上架

A block that automatically creates a list of anchor links to headings in a post.

正在使用
10 以下
评分
暂无
累计下载
786
最近更新
2024年9月26日
需要 WordPress 6.0+已测试到 6.6.12PHP 7.0+

贡献者

截图

A sample Auto Anchor List display in custom Twenty-Twenty Three theme.
A sample Auto Anchor List display in custom Twenty-Twenty Three theme.
An Auto Anchor List in the list view of the WordPress block editor. The heading block above the list has the "No Anchor" block style applied, so it does not appear in the auto-generated list.
An Auto Anchor List in the list view of the WordPress block editor. The heading block above the list has the "No Anchor" block style applied, so it does not appear in the auto-generated list.

A block that automatically creates a list of anchor links to headings in a post.

Usage

Insert the “Auto Anchors Links List” block where you’d like it to appear. A post can only contain one “Auto Anchor Links List” block. Preview the post to view the list display and test links.

Heading levels h2-h6 are supported. Heading levels (h2 -> h3 -> h4) must be ordered properly; sub-heading levels are indented in the list.

The “Auto Anchors Links List” block is automatically updated when headings in the post are modified. Any manual edits to the list will be overwritten. To maintain the list manually, remove the “auto-anchor-links-list” class from the block to transform it into a WordPress core list block.

Additional Controls

Apply the “Manual Anchor” block style to a heading and then set its anchor text attribute to:

  • [empty] A plain heading tag (omitted from auto anchors list)
  • [“custom-anchor”] A persistent custom anchor; useful for permalinks (included in auto anchors list)

Add a “no-auto-anchor” class to any heading block to omit it from auto anchors list.

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums