跳到内容

Simple Sticky TOC

v1.0.1

pavlobondarchuk · 2025年8月10日 上架

Lightweight sticky table of contents for mobile and desktop. Automatically generates anchor links for h2–h4 headings. No jQuery.

正在使用
10 以下
评分
暂无
累计下载
597
最近更新
2025年8月10日
需要 WordPress 5.0+已测试到 6.8.13PHP 7.2+

截图

Sticky TOC on desktop
Sticky TOC on desktop
Toggleable TOC on mobile
Toggleable TOC on mobile
Admin panel for depth control
Admin panel for depth control
TOC layout in RTL mode
TOC layout in RTL mode

Simple Sticky TOC automatically generates a sticky table of contents for single posts or pages by parsing <h2>, <h3>, and <h4> tags. It is lightweight, mobile-friendly, and works without jQuery.

Features:
– Automatically detects and anchors h2–h4 headings
– Sticky TOC with vertical layout on desktop
– Sticky toggleable TOC on mobile
– Built-in RTL support (positioning + layout)
– Option to disable TOC on individual posts
– Option to customize TOC layout from your theme
– Auto-generated anchor IDs for headings
– Clean CSS, pure JavaScript, no jQuery

Theme Override Support

To override the default markup or styles:

  1. Copy the default template files from the plugin:

    • frontend/partials/toc-template.php
    • assets/css/toc.css
    • assets/js/toc.js
  2. Paste them into your theme inside the following folder:

    • your-theme/simple-sticky-toc/

Supported override files:

  • simple-sticky-toc/toc-template.php – custom TOC markup
  • simple-sticky-toc/toc.css – custom styles
  • simple-sticky-toc/toc.js – custom JS behavior

Plums

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

导航

说明

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

© 2026 Plums