Linux 软件免费装

plover-toc

开发者 wkhayrattee
Wasseem Khayrattee
更新时间 2026年4月16日 06:10
PHP版本: 8.0 及以上
WordPress版本: 6.9.4
版权: GPL-3.0-only
版权网址: 版权信息

标签

table of contents toc

下载

0.8.0 0.8.1

详情介绍:

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 Requirements

安装:

  1. Through the WordPress plugins screen, Add New Plugin
  2. Alternatively, you can download the plugin from the WordPress Plugin Directory and upload it to your site.
  3. Search for "plover toc"
  4. Install and Activate
  5. Use the shortcode [plovertoc] in your content
  6. simply add the shortcode [plovertoc] to your post or page where you want the table of contents to appear.
  7. (Optional) Customize the top_level, depth, and schema attributes in the shortcode to specify which heading levels to include.
  8. 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"]
  9. 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 ``` 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');

更新日志:

0.7.0 (Aug 11, 2024) 0.6.0 (Jun 30, 2024) 0.5.0 (Jun 27, 2024) 0.1.0 (Nov 4, 2023)