Title: PloverToc
Author: Wasseem Khayrattee
Published: <strong>2024 年 8 月 12 日</strong>
Last modified: 2026 年 4 月 15 日

---

搜尋外掛

![](https://s.w.org/plugins/geopattern-icon/plover-toc.svg)

# PloverToc

 由 [Wasseem Khayrattee](https://profiles.wordpress.org/wkhayrattee/) 開發

[下載](https://downloads.wordpress.org/plugin/plover-toc.0.8.1.zip)

 * [詳細資料](https://tw.wordpress.org/plugins/plover-toc/#description)
 * [使用者評論](https://tw.wordpress.org/plugins/plover-toc/#reviews)
 *  [安裝方式](https://tw.wordpress.org/plugins/plover-toc/#installation)
 * [開發資訊](https://tw.wordpress.org/plugins/plover-toc/#developers)

 [技術支援](https://wordpress.org/support/plugin/plover-toc/)

## 外掛說明

### About

PloverToc is a simple and efficient WordPress plugin that automatically generates
a table of contents (TOC) for your posts, pages and custom post types. By using 
a shortcode, you can easily insert a TOC that helps your readers navigate through
your content by providing direct links to different sections. You can also customize
the heading levels included in the TOC.

It’s focused on providing a sound TOC interface with no “bells and whistles”. While
it does come with some helpful features for customizing the included heading levels
via shortcode attributes, the esthetic design and styling of the TOC is left to 
the user to implement using their own CSS.

Additionally, it does add SiteNavigationElement schema to enhance your site’s SEO.

### Features

 * Automatically generate a table of contents for your posts and pages.
 * Customizable heading levels to include in the TOC (e.g., H1, H2, H3).
 * Collapse TOC on page upload, without any JavaScript.
 * This plugin is 100% javascript-free.
 * Simple shortcode to insert the TOC anywhere in your content.
 * Compatible with the latest version of WordPress with Gutenberg.
 * Compatible with the Classic Editor as well.
 * Users are responsible for styling the TOC using their own CSS.
 * Custom post types are supported, as long as their content is output with the 
   the_content() template tag.
 * Will generate SiteNavigationElement schema to enhance SEO, this can be turned
   off via shortcode attribute.

### Requirements

 * PHP >= 8.0
 * WordPress >= 6.4.0

### Contributing

The best way to contribute to the development of this plugin is by participating
on the GitHub project:

[https://github.com/PloverHub/plover-toc](https://github.com/PloverHub/plover-toc)

There are many ways you can contribute:

 * Raise an issue if you found one
 * Create/send us a Pull Request with your bug fixes and/or new features
 * Provide us with your feedback and/or suggestions for any improvement or enhancement
 * Translation – this is an area we are yet to do

## 安裝方式

1) Through the WordPress plugins screen, Add New Plugin
 – Alternatively, you can
download the plugin from the WordPress Plugin Directory and upload it to your site.
2) Search for “plover toc” 3) Install and Activate 4) Use the shortcode `[plovertoc]`
in your content – simply add the shortcode `[plovertoc]` to your post or page where
you want the table of contents to appear. 5) (Optional) Customize the top_level,
depth, and schema attributes in the shortcode to specify which heading levels to
include. – You can customize the heading levels included in the TOC using the `top_level`
and `depth` attributes in the shortcode. For example: `[plovertoc top_level="2" 
depth="3"]` – You can also turn off the SiteNavigationElement schema using the `
schema` attribute in the shortcode. For example: `[plovertoc schema="false"]`

### Shortcode Attributes

    ```
    [plovertoc top_level="2" depth="4"] would mean generating a TOC that includes only H2, H3, H4 and H5 headings.
    [plovertoc top_level="1" depth="3"] would mean generating a TOC that includes only H1, H2, and H3 headings.
    [plovertoc top_level="1" depth="2"] would mean generating a TOC that includes only H1, and H2 headings.
    ```

### Styling

You can target the css class “plover-toc-wrapper” and “plover-toc-items”. See below
the actual HTML structure to guide you.

    ```
    `html
    ```

 Open Table of contents

 *  [{anchor_text}}](https://tw.wordpress.org/plugins/plover-toc/?output_format=md#{anchor_id}})
    -  [{anchor_text}}](https://tw.wordpress.org/plugins/plover-toc/?output_format=md#{anchor_id}})

    ```
    `
    ```

### Localization

PloverToc supports localization. To translate the plugin into your language, add
the appropriate translation files in the `languages` directory. The text domain 
for this plugin is `plover-toc`.

You can also customize the summary text of the table of contents by using the `plover_toc_summary_text`
filter as shown below. The default summary text is localizable.

### Changing the header (summary) text of the TOC

To customize the summary text of the table of contents, use the `plover_toc_summary_text`
filter.

Example to change summary text:
 `php function custom_toc_summary_text(string $text){
return __('My Custom Table of Contents', 'plover-toc'); } add_filter('plover_toc_summary_text','
custom_toc_summary_text');

## 使用者評論

這個外掛目前沒有任何使用者評論。

## 參與者及開發者

以下人員參與了開源軟體〈PloverToc〉的開發相關工作。

參與者

 *   [ Wasseem Khayrattee ](https://profiles.wordpress.org/wkhayrattee/)

[將〈PloverToc〉外掛本地化為台灣繁體中文版](https://translate.wordpress.org/projects/wp-plugins/plover-toc)

### 對開發相關資訊感興趣？

任何人均可[瀏覽程式碼](https://plugins.trac.wordpress.org/browser/plover-toc/)、
查看 [SVN 存放庫](https://plugins.svn.wordpress.org/plover-toc/)，或透過 [RSS](https://plugins.trac.wordpress.org/log/plover-toc/?limit=100&mode=stop_on_copy&format=rss)
訂閱[開發記錄](https://plugins.trac.wordpress.org/log/plover-toc/)。

## 變更記錄

### 0.7.0 (Aug 11, 2024)

 * Rebrand the plugin from “ClaraPress” to “PloverToc”:
    - The WordPress Plugin Review Team warned of infringement on the WordPress trademark
      by virtue of the portmanteau effect in which the “Press” part in “ClaraPress”
      was deemed as a composition of Clara and WordPress and hence a violation of
      the WordPress trademark policy.
    - This also meant I had to abandon my ClaraPress.com domain name and move to
      a new one, namely PloverHub.com

### 0.6.0 (Jun 30, 2024)

 * Added customizable heading levels for TOC using top_level and depth shortcode
   attributes.
 * Implemented a filter clarapress_toc_summary_text to allow overriding the summary
   text in the TOC.
 * Added localization support for summary text using the __() function and text 
   domain clarapress-toc.
 * Ensured compatibility with PHP 8.0+ and WordPress 6.4+
 * Added a section for styling guidelines and provided an HTML template for users
   to see CSS classes to target.
 * Updated documentation to include usage examples and customization options.
 * Added SiteNavigationElement schema to enhance SEO with an option to enable/disable
   it via shortcode attribute schema.

### 0.5.0 (Jun 27, 2024)

 * Workout a Github Action to automate the release process whenever a new tag is
   pushed to the repository.

### 0.1.0 (Nov 4, 2023)

 * Initial commit of working code for the benefit of everyone who needs this plugin

## 中繼資料

 *  版本 **0.8.1**
 *  最後更新 **1 個月前**
 *  啟用安裝數 **少於 10 次**
 *  WordPress 版本需求 ** 6.4.0 或更新版本 **
 *  已測試相容的 WordPress 版本 **6.9.4**
 *  PHP 版本需求 ** 8.0 或更新版本 **
 *  語言
 * [English (US)](https://wordpress.org/plugins/plover-toc/)
 * 標籤:
 * [table of contents](https://tw.wordpress.org/plugins/tags/table-of-contents/)
   [toc](https://tw.wordpress.org/plugins/tags/toc/)
 *  [進階檢視](https://tw.wordpress.org/plugins/plover-toc/advanced/)

## 評分

這個項目尚無任何評論記錄。

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

[查看全部使用者評論](https://wordpress.org/support/plugin/plover-toc/reviews/)

## 參與者

 *   [ Wasseem Khayrattee ](https://profiles.wordpress.org/wkhayrattee/)

## 技術支援

使用者可在技術支援論壇提出意見反應或使用問題。

 [檢視技術支援論壇](https://wordpress.org/support/plugin/plover-toc/)