Seo Friendly Table of Contents
This plugin puts a table of contents on your page. You just need to type one line of code in the page/post editor. That’s it! You dont need to edit your themes source code. The plugin allows you to set a title of the toc box. You can also choose which heading tags (h1,h2,h3,h4 etc) you want to have in the table of contents.
- Download the plugin at WordPress.org
- Upload the plugin source to the `/wp-content/plugins/` directory
- Activate the plugin through the ‘Plugins’ menu in WordPress
- Put [toc levels=2 title="Table of contents"] on a page with at least one h2 heading.
Put [toc levels=2 title="Table of contents"] on a page with at least one h2 heading.
The plugin assumes that you are using headings correctly. If you use [toc levels=3 title="Table of contents"] then the first heading in the content should be a h2. You must not have a h4 before you use h3. Follow common sense and rules of writing a good texts and you will have no problem.
How can I make the table of contents centered, or make it change colors?
If you want to style the table of contents you have to use CSS. The plugin does not write the CSS itself but there might be a future update that will include this feature.
How do I use the function call to get my table of contents?
It is way easier that in version 1 of the plugin. All you have to do is to write these lines in your template:
//get the table of contents $toc=getSeo_toc(array(2,3,4),"Table of contents"); //print the table echo $toc;
Fixed the backwards compatibility break.
Did some major updates to the plugin. Now it is easier to use the php-function to get the table of contents and the shortcode is not visible on the excerpt.
WARNING: This function is not compatible with previous version of the plugin. If you are updating you have to do some changes in your earlier posts or template files. (Fixed in version 2.0.1)
Added a callback function to import the style.
Removed some minor HTML errors and added a CSS class.
I created it.