plugin-icon

Simple Sticky TOC

作者:pavlobondarchuk·
Lightweight sticky table of contents for mobile and desktop. Automatically generates anchor links for h2–h4 headings. No jQuery.
版本
1.0.1
最后更新
Aug 10, 2025
Simple Sticky TOC

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
免费基于付费套餐
通过安装,您同意 WordPress.com 服务条款第三方插件条款
目前已测试版本
WordPress 6.8.6
这个插件是可用的下载,适用于您的站点。