We Can Create WordPress Table of Content Near Automatically Without No Plugin Only With jQuery With Per Post Control Inside Post or Sidebar. There are actually lot of good jQuery plugin for creating these Table of Contents.
WordPress Table of Content : Our Previous Articles
We have at least three articles cum guides on WordPress Table of Content – WordPress Table of Content Plugins and Manual Methods, WordPress Table of Content With jQuery ScrollTo, WordPress Table of Content.
The previous articles might have tricks which will be not repeated here. The practical part is that, we usually need Table of Content only for certain posts. But 100% manual HTML coding is too painful. This is where jQuery to generate Table of Content on a specific post becomes useful.
WordPress Table of Content : No Plugin, jQuery Powered
We will be injecting scripts via some custom field of the post or directly including the js inside the post in Text mode. If we only include this script, obviously if jQuery is loaded along with it, it will render a table of content :
Chris Coyier wrote the code.
As you can see, you only need to mark the headers, other two can be easily injected on per post basic. Rest is automatic. Table of Contents Plus Plugin will help you to create stuffs on Widget, if you are going to use site-wide.
If you looking for a great looking Table of Content, you might use this :
https://github.com/impressivewebs/fixed-TOC-dropdown-jquery # copy the url to text editor first
This will give a collapsable Table of content, which is somewhat rare in normal usage. It is probably more towards modern UI.
Follow the Author of this article :