
Shortcode Table of Contents
v1.0.3James Kemp · 2017年11月29日 上架
Display an automated table of contents via shortcode.
- 正在使用
- 200+
- 评分
- 4.7 / 5
- 累计下载
- 2.9 万
- 最近更新
- 2018年8月1日
6 条评价需要 WordPress 4.0+已测试到 4.9.36
贡献者
截图
![Add the [toc] shortcode to any post/page/custom-post-type, at any position in the content.](https://ps.w.org/shortcode-toc/assets/screenshot-1.png?rev=1779328)



Simply use the [toc content=".your-container"] shortcode to automatically generate a table of contents for any HTML container.
The shortcode accepts a number of parameters:
contentstring required
A CSS selector indicating the container of your content.headersstring
A comma separated list of heading selectors that you want to include.speedint
Speed of sliding back to top.anchor-classstring
Class of anchor links.anchor-textstring
Prepended or appended to anchor headings. Leave blank to disable anchor links.top_classstring
Back to top button or link class.spytrue/false
Enable scroll spy. This will highlight the list items as you scroll past them.positionappend/prepend
Position of anchor text.spy-offsetint
Specify heading offset for spy scrolling.