| 开发者 | pierreferrolliet |
|---|---|
| 更新时间 | 2026年10月5日 14:34 |
| PHP版本: | 8.2 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPL-2.0-or-later |
| 版权网址: | 版权信息 |
[tidy_toc] for manual placementtidy-table-of-contents folder to /wp-content/plugins/By default H2 and H3. You can configure the minimum and maximum heading depth in the settings.
Yes. Each post has a meta box where you can disable the TOC or override global settings.
Yes. The TOC is generated server-side from the rendered post content, so it works regardless of how the post was written.
No. The TOC output is cached per post and invalidated automatically when the post is updated.
Yes. Use the [tidy_toc] shortcode anywhere in your content, or disable auto-insertion in the settings.
By default a post needs at least three headings before a table of contents is worth showing. You can lower that threshold in Settings, or set a minimum word count instead.
Yes. It goes after the first paragraph by default, which is what most readers expect, but you can place it before the content, after the first heading, or turn automatic insertion off and use the block or the [tidy_toc] shortcode.
It gives Google a clean anchor structure to work with, which is what jump links are built from. Nobody can promise sitelinks, but a proper heading outline with stable anchors is the prerequisite.
It adds an anchor id to headings that do not already have one, and leaves existing ids alone. Links you have already shared keep working.
Yes. Settings lets you exclude categories, tags and individual headings by their text, which is handy for boilerplate sections like "Comments" or "Related articles".
No. Assets are only enqueued on pages that actually display a table of contents, and the markup is cached per post.
box-sizing: border-box so its padding is included in the collapsed height (full collapse, no leftover band).rem fallback added in 1.0.4).rem so they track the theme's root font size while staying isolated from nested overrides.load_plugin_textdomain() call (handled by WordPress.org translation system since WP 4.6).