WordPress.org

Ready to get started?Download WordPress

Plugin Directory

!This plugin hasn't been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

Table of Content

A Table of Content (TOC) generator

Can i disable the "^" markers in the headlines ?

Yes, via stylesheet, like so:

.pni-content .toplink { display: none ! important }

Can i change the list number style ?

Yes, also via stylesheet. For using decimals in all instances (level1, level2, ..):

.pni-navigation ol li { list-style-type: decimal ! important }

Or to use discs (non-numeric), change the style like so:

.pni-navigation ol li { list-style-type: disc ! important }

See http://www.w3schools.com/css/pr_list-style-type.asp for more info

Can i use this plugin in with add_filter ?

Yes. The following example shows how you can add the TOC as a filter to the_content, which will auto-use the TOC in any of your posts. Therefore add the following at the end of the functions.php file of your theme:

if ( function_exists( 'toc_filter' ) && ! function_exists( 'theme_toc_filter' ) ) {
    function theme_toc_filter( $content = "" ) {
        return toc_filter( $content );
    }
    add_filter( 'the_content', 'theme_toc_filter' );
}

If you use other content modifying plugins and your short-codes get messed up, try to adjust the priority higher (eg: add_filter( 'the_content', 'theme_toc_filter', 999 ) or even higher).

If you need to disable the TOC in a single page of your theme, you can define the 'DISABLE_TOC' constant with a true value:

define( 'DISABLE_TOC', true );

Requires: 2.7 or higher
Compatible up to: 3.1.0
Last Updated: 2010-10-28
Downloads: 3,817

Ratings

3 stars
3.1 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

0,1,0
100,1,1
100,1,1 100,1,1
0,1,0
100,2,2
100,1,1