Linux 软件免费装
Banner图

FlexiTOC – Flexible Table of Contents

开发者 nazmulasif
更新时间 2026年7月27日 01:32
PHP版本: 7.4 及以上
WordPress版本: 7.0
版权: GPLv2 or later
版权网址: 版权信息

标签

block table of contents toc table of content table of contents block

下载

1.0.0 1.0.1 1.0.2 1.0.3

详情介绍:

Install it, and every post that needs a table of contents gets one. That is the whole setup. FlexiTOC reads the final rendered page — Gutenberg blocks, classic content, shortcode output — finds the headings, gives them stable anchor links, and builds the navigation in one pass. Because the TOC and the anchors come from the same pass, they cannot drift apart: no orphaned links, no "TOC shows a heading I deleted", no anchors pointing nowhere. That same reliability makes it SEO-friendly — and just as usable for readers: choose exactly which heading levels appear, or flatten the hierarchy entirely, so a long page gets a clean list instead of a wall of deeply nested levels. Authors stay in control without ever maintaining a list: One engine, three doors However you place it, the same engine renders it: Looks native, behaves politely For developers and page builders

安装:

  1. Install FlexiTOC from Plugins → Add New (search "FlexiTOC"), or upload the zip from Plugins → Add New → Upload Plugin.
  2. Activate it. That's it — the next eligible post or page gets a table of contents automatically.
  3. To adjust position, heading levels, or style, visit Settings → FlexiTOC. To place it manually instead, use the FlexiTOC block or the [flexitoc] shortcode.

屏幕截图:

  • Per-heading controls on the Heading block.
  • The FlexiTOC Headings manager panel.
  • Settings page.

常见问题:

Will FlexiTOC slow down my site?

No measurable impact on pages without a TOC — no CSS or JS loads unless a TOC actually renders. Even where it does, the stylesheet is small and the optional scroll-spy script (only loaded if you enable "highlight current section") is under 1 KB.

Is FlexiTOC really free — will there be a paid upgrade later?

Yes, really free, and it stays that way. There is no Pro tier, no feature paywall, and no upsell nags. Every feature described on this page — automatic insertion, per-heading control, sticky sidebar, the works — is in the free plugin, permanently.

Why doesn't the TOC appear on a post?

By default it needs at least 2 eligible headings (configurable). A TOC listing one entry is noise, so the automatic mode skips it — but a block or shortcode you placed yourself always renders.

Where do I include/exclude a single heading?

Select the heading block and use its "Table of contents" panel — or open FlexiTOC Headings in the document sidebar to manage all of them at once. In the classic editor or a page builder, add the flexitoc-include / flexitoc-exclude CSS class instead.

How do per-heading choices interact with heading levels?

Levels are the default; explicit choices win. A heading you explicitly include shows even if its level isn't selected, and one you exclude never shows. Headings you never touched simply follow the effective levels (block setting → per-post setting → site default).

Does it modify my post content in the database?

No. Anchor ids are injected at render time only. Your stored content is never touched.

Can I put it in a sidebar or template?

Yes — the FlexiTOC block works in widget areas, template parts and Site Editor templates, and shows the TOC of the post being viewed. Enable Sticky and "Highlight current section" for a documentation-style sidebar.

What are the shortcode options?

[flexitoc title="Contents" levels="2,3" list="ol" hierarchy="flat" collapse="closed" sticky="1" scrollspy="1" class="my-class"] — every attribute is optional; anything you omit inherits the global settings. list accepts ul (bulleted), ol (numbered), or none (no marker). hierarchy accepts nested (default) or flat (single level — best for sidebars).

A post shouldn't have an automatic TOC — how do I turn it off?

Open FlexiTOC Display in that post's sidebar and choose "Do not auto-insert" (or a different position for just that post). Manual blocks and shortcodes are not affected.

更新日志:

1.0.3 1.0.2 1.0.1 1.0.0