Title: LH Table of Contents
Author: shawfactor
Published: <strong>2017 年 11 月 23 日</strong>
Last modified: 2019 年 10 月 4 日

---

搜索插件

![](https://ps.w.org/lh-table-of-contents/assets/banner-772x250.jpg?rev=1773711)

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://ps.w.org/lh-table-of-contents/assets/icon-256x256.png?rev=1773711)

# LH Table of Contents

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

[下载](https://downloads.wordpress.org/plugin/lh-table-of-contents.zip)

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

 [支持](https://wordpress.org/support/plugin/lh-table-of-contents/)

## 描述

This plugin makes it easy to create a wiki like TOC (table of contents) in your 
posts or pages using shortcode, no linking or creating anchor is needed.

Unlike other plugins this is 100% semantic, ie drop the comment string: `<!-- lh_toc--
>`.

Into your content body and the plugin will do the rest ie it will generate a table
of contents based on the h2 and h3 tags in the content body.

If the comment is not included the table of contents is not generated.

#### Features:

## 安装

 1. Upload the entire `lh-table-of-contents` folder to the `/wp-content/plugins/` directory.
 2. Activate the plugin through the ‘Plugins’ menu in WordPress.
 3. Include the string:  in the content body where you want the table of contents
 4. Done!

## 常见问题

  How to style the TOC

I left the styling up to you but the tabel of contents itself has a class of ‘lh_table_of_contents’,
the anchors for h2 tags have a class of ‘lh_toc-h2’, and the anchors for h3 have
a class of ‘lh_toc-h3’.

## 评价

![](https://secure.gravatar.com/avatar/6f0c5bb3659a884e78687e7a1d9f51fb4e31aa49ed62b6c1c1b1a4c60ebdf761?
s=60&d=retro&r=g)

### 󠀁[How to Display TOC?](https://wordpress.org/support/topic/how-to-display-toc/)󠁿

 [Tahir Taous](https://profiles.wordpress.org/tahirtaous/) 2019 年 9 月 24 日

What do you mean by ie drop the comment string: I have installed and activaed this
plugin but can't figure out how to use this. I am just trying all of your plugins
and you don't explain it clearly how to use your plugins. I am a big fan of LH Zero
Spam and have been using it for more than 3 years.

 [ 阅读所有0条评价 ](https://wordpress.org/support/plugin/lh-table-of-contents/reviews/)

## 贡献者及开发者

「LH Table of Contents」是开源软件。 以下人员对此插件做出了贡献。

贡献者

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

[帮助将「LH Table of Contents」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/lh-table-of-contents)

### 对开发感兴趣吗?

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

## 更新日志

**1.00 November 20, 2017**
 Initial release.

**1.05 November 25, 2017**
 Better approach to adding Toc.

## 额外信息

 *  版本 **1.05**
 *  最后更新：**7 年前**
 *  活跃安装数量 **50+**
 *  WordPress 版本 ** 4.0 或更高版本 **
 *  已测试的最高版本为 **5.2.30**
 *  语言
 * [English (US)](https://wordpress.org/plugins/lh-table-of-contents/)
 * 标签
 * [semantic](https://cn.wordpress.org/plugins/tags/semantic/)[table of contents](https://cn.wordpress.org/plugins/tags/table-of-contents/)
   [toc](https://cn.wordpress.org/plugins/tags/toc/)[wiki like toc](https://cn.wordpress.org/plugins/tags/wiki-like-toc/)
 *  [高级视图](https://cn.wordpress.org/plugins/lh-table-of-contents/advanced/)

## 评级

 5 星（最高 5 星）。

 *  [  1 条 5 星评价     ](https://wordpress.org/support/plugin/lh-table-of-contents/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/lh-table-of-contents/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/lh-table-of-contents/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/lh-table-of-contents/reviews/?filter=2)
 *  [  0 条 1 星评价     ](https://wordpress.org/support/plugin/lh-table-of-contents/reviews/?filter=1)

[您的评价](https://wordpress.org/support/plugin/lh-table-of-contents/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/lh-table-of-contents/reviews/)

## 贡献者

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

## 支持

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

 [查看支持论坛](https://wordpress.org/support/plugin/lh-table-of-contents/)

## 捐助

您愿意支持这个插件的发展吗?

 [ 捐助此插件 ](https://lhero.org/portfolio/lh-table-of-contents/)