Title: Simple Sticky TOC
Author: pavlobondarchuk
Published: <strong>2025 年 8 月 10 日</strong>
Last modified: 2025 年 8 月 10 日

---

搜索插件

![](https://ps.w.org/simple-sticky-toc/assets/banner-772x250.jpg?rev=3342297)

![](https://ps.w.org/simple-sticky-toc/assets/icon-256x256.jpg?rev=3342297)

# Simple Sticky TOC

 作者：[pavlobondarchuk](https://profiles.wordpress.org/bonddesign/)

[下载](https://downloads.wordpress.org/plugin/simple-sticky-toc.1.0.1.zip)

 * [详情](https://cn.wordpress.org/plugins/simple-sticky-toc/#description)
 * [评价](https://cn.wordpress.org/plugins/simple-sticky-toc/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/simple-sticky-toc/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/simple-sticky-toc/#developers)

 [支持](https://wordpress.org/support/plugin/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:
 2.  * `frontend/partials/toc-template.php`
     * `assets/css/toc.css`
     * `assets/js/toc.js`
 3. Paste them into your theme inside the following folder:
 4.  * `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

## 屏幕截图

[⌊Sticky TOC on desktop⌉⌊Sticky TOC on desktop⌉[

Sticky TOC on desktop

[⌊Toggleable TOC on mobile⌉⌊Toggleable TOC on mobile⌉[

Toggleable TOC on mobile

[⌊Admin panel for depth control⌉⌊Admin panel for depth control⌉[

Admin panel for depth control

[⌊TOC layout in RTL mode⌉⌊TOC layout in RTL mode⌉[

TOC layout in RTL mode

## 安装

 1. Upload the plugin folder to the `/wp-content/plugins/` directory.
 2. Activate the plugin through the ‘Plugins’ menu in WordPress.
 3. The TOC will appear automatically above your post content.

## 常见问题

### Can I choose which heading levels are used?

Yes. Go to **Settings  BNDDSGN_Simple Sticky TOC** and select the depth (h2, h2–
h3, or h2–h4).

### Can I disable TOC on some posts?

Yes, there’s a checkbox in the post editor sidebar to disable it per-post.

### Can I change the layout or style?

Yes, copy `toc-template.php`, `toc.css`, or `toc.js` into your theme folder (`simple-
sticky-toc/`) and customize freely.

### Is this plugin compatible with RTL sites?

Yes, it automatically adjusts alignment and layout.

### Does it work with block themes (FSE)?

Yes.

## 评价

此插件暂无评价。

## 贡献者及开发者

「Simple Sticky TOC」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ pavlobondarchuk ](https://profiles.wordpress.org/bonddesign/)

[帮助将「Simple Sticky TOC」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/simple-sticky-toc)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/simple-sticky-toc/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/simple-sticky-toc/)，或通过[RSS](https://plugins.trac.wordpress.org/log/simple-sticky-toc/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/simple-sticky-toc/)。

## 更新日志

#### 1.0.1

 * Unified unique prefixes for all plugin functions, classes, constants, and options
   to prevent conflicts.
 * Updated Contributors field to `bonddesign`.
 * Updated Stable tag to match the release version.
 * Removed macOS hidden files (`.DS_Store`, `__MACOSX`) from the distribution package.

#### 1.0.0

 * Initial release
 * Auto-injects sticky TOC from headings (h2–h4)
 * Responsive layout with sticky toggle button on mobile
 * Per-post disable option
 * Customizable template, CSS, and JS via theme override
 * RTL support for layout and direction
 * Clean structure (no jQuery)

## 额外信息

 *  版本 **1.0.1**
 *  最后更新：**10 月前**
 *  活跃安装数量 **不到10**
 *  WordPress 版本 ** 5.0 或更高版本 **
 *  已测试的最高版本为 **6.8.5**
 *  PHP 版本 ** 7.2 或更高版本 **
 *  语言
 * [English (US)](https://wordpress.org/plugins/simple-sticky-toc/)
 * 标签
 * [anchor](https://cn.wordpress.org/plugins/tags/anchor/)[headings](https://cn.wordpress.org/plugins/tags/headings/)
   [sticky](https://cn.wordpress.org/plugins/tags/sticky/)[table of contents](https://cn.wordpress.org/plugins/tags/table-of-contents/)
   [toc](https://cn.wordpress.org/plugins/tags/toc/)
 *  [高级视图](https://cn.wordpress.org/plugins/simple-sticky-toc/advanced/)

## 评级

尚未提交反馈。

[Your review](https://wordpress.org/support/plugin/simple-sticky-toc/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/simple-sticky-toc/reviews/)

## 贡献者

 *   [ pavlobondarchuk ](https://profiles.wordpress.org/bonddesign/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/simple-sticky-toc/)