Table of Contents Plus 1211 released


  • New: allow %PAGE_TITLE% to be used in the TOC title.  Note that this also works in the widget title too.  When used, this variable will be replaced with the current page’s title.  Thanks to Peter for the request.
  • New: new option to hide the TOC initially.  Thanks to Jonas, Jonathan, and Doc Germanicus for requesting it.
  • New: added ability to customise visited TOC link colour.
  • New: option to restrict generation to a URL path match.  For example, you can restrict to wiki pages that fall under http://domain/wiki/ by entering /wiki/ into the field.  The setting can be found in the advanced options.  Thanks to Tux and Justine Smithies for suggesting it.
  • Make regular expressions less greedy.  That means you can have multiple headings on a single line whereas before you needed to ensure each heading was on their own line.  Thanks to drdamour for raising and providing a fix.
  • Also make regular expressions match across multiple lines.  This means you can have your single heading split across many lines.
  • Better accessibility: when using smooth scrolling, allow for focus to follow the target, eg tabbing through will continue from the content block you clicked through to.
  • Better performance: as requested by a few, javascript files have been consolidated into one and both javascript and CSS files are now minified.
  • ‘Auto’ is now the default width which means it’ll take up the needed amount of space up to 100%.  The previous default was a fixed width of 275px.
  • Added the ability to exclude entire branches when using [sitemap_pages] and [sitemap_categories] using the exclude_tree attribute.  Thanks to Benny Powers for requesting it.
  • Wrap index numbers around span tags to enable easier CSS customisation.  The spans are have two classes: toc_number and toc_depth_X where X is between 1 and 6.  Thanks to Matthias Krok for requesting it.
  • Moved the ‘preserve theme bullets’ option into the advanced section.
  • Updated and simplified the translation file.
  • Fixed: [sitemap_categories] using the wrong label when none was specified.  Thanks to brandt-net for raising it.  The labels for both [sitemap_pages] and [sitemap_categories] may be removed in a future update as you can insert the title within your content.

If you run into issues, or have suggestions, please make them at


Table of Contents Plus 1208 released

Just tagged the 1208 release.  Changelog:

  • New: advanced option to prevent the output of this plugin’s CSS. This option allows the site owner to incorporate styles in one of their existing style sheets. Thanks to Ivan and Swashata for suggesting it.
  • Added Simplified Chinese translation thanks to icedream
  • Make more translatable by adding a translation POT file in the languages folder. Translations welcome!
  • Adjust multibyte string detection as reported by johnnyvaughan
  • Support PHP 5.4.x installations. Thanks to Josh for raising it.
  • Fixed: -2 appearing in links when using the TOC+ widget. Thanks to Arturo for raising it.

This version does not yet support content that have been split up into multiple pages using the <–nextpage–> quicktag.

If you run into issues, or have suggestions, please make them at


Table of Contents Plus 1207 released

This is the first release for 2012 and includes:

  • New: when smooth scrolling is enabled, allow the top offset to be specified to support more than the WordPress admin bar (such as Twitter Bootstrap).  The offset is displayed in the advanced section after you have enabled smooth scrolling.  Thanks to Nicolaus for the suggestion.
  • Allow 2 headings to be set as the minimum (used to be 3).  Thanks to Fran for justifying it.
  • Run later in the process so other plugins don’t alter the anchor links (eg Google Analytics for WordPress).
  • Do not show a TOC in RSS feeds.  Thanks to Swashata for raising it.
  • Bump tested version to WordPress 3.5-alpha.
  • Added help material about why some headings may not be appearing.
  • Added banner image for WordPress repository listing.
  • Updated readme.txt with GPLv2 licensing.

This version does not yet support content that have been split up into multiple pages using the <–nextpage–> quicktag.

If you run into issues, or have suggestions, please make them at


Table of Contents Plus 1112 released

1112 is mostly a maintenance release and is now available on the WordPress repository.  Here’s the changelog:

  1. New: auto width option added which takes up only the needed amount of horizontal space up to 100%.
  2. Removed trailing – or _ characters from the anchor to make it more pretty.
  3. This plugin’s long name has changed from “Table of Contents+” to “Table of Contents Plus”.  The short name remains as “TOC+”.
  4. Fixed: when using the TOC shortcode within your content, your post or article would display the TOC on the homepage despite having the exclude from homepage option enabled.  If you also used the “more tag”, then you may have resulted with an empty TOC box.  These are now addressed.
  5. Fixed: all anchors ending with “-2” when no headings were repeated.  This was caused by plugins and themes that trigger `the_content` filter.  The counters are now reset everytime `the_content` is run rather than only on initialisation.

If you run into issues, or have suggestions, please make them at


Table of Contents Plus 1111 on Remembrance Day

A new update will be made available on the WordPress repository on Remembrance Day (that’s 11th November) 2011.  In my opinion, this release is quite a large update with a mixture of new features, mechanical changes, and bug fixes.  Most were a result of your suggestions and feedback so keep at it

Here’s the changelog (it may change slightly between now and then though):

  • New: option to adjust the font size.  Thanks to DJ for the suggestion.  The default remains at 95%.
  • New: advanced option to select the heading levels (1 to 6) to be included.  Thanks to those that hinted about wanting to achieve this.
  • New: you can now have the TOC appear in the sidebar via the TOC+ widget.  Thanks to Nick Daugherty and DJ for the suggestion.
  • The TOC shortcode now supports the heading_levels attribute to allow you to limit the headings you want to appear in the table of contents on a per instance basis.  Separate multiple headings with a comma.  For example: include headings 3, 4 and 5 but exclude the others with
    [toc heading_levels="3,4,5"]
  • The TOC shortcode also supports the wrapping attribute with possible values: left or right.  This lets you wrap text next to the table of contents on a per instance basis.  Thanks to Phil for the suggestion.
  • Better internal numbering system to avoid repeated headings.  This means that for non-repeated headings, there is no trailing number in the anchor.
  • Fixed: repeated headings on the same level are no longer broken.  For users with international character sets, please report any strange garbage characters in your headings (eg a character ends up being a question mark, square symbol, or diamond).  Thanks to Juozas for the assistance.
  • Fixed: removed PHP notices on a verbosely configured PHP setup.
  • Fixed: suppress TOC frame output when heading count was less than the minimum required.


  • Consolidated information about shortcodes and their attributes into the help tab.
  • Note: when removing the last TOC+ widget, please make sure you disable the “Show the table of contents only in the sidebar” option otherwise your table of contents won’t appear where you’d expect. I will look to address this in the future.

Table of Contents Plus 1109 released

1109 is now available on the WordPress repository.  It is a small maintenance release polishing off a few things:

  1. Adjusted hide action for a smoother transition.
  2. Apply custom link and hover colours (when selected) to show/hide link in the title.
  3. Renamed jquery.cookie.min.js to jquery.c.min.js to overcome false positive with mod_security.  Mod_security would block requests to this file which would break the ability to save a user’s show/hide preference.  In some cases, it has also broken other javascript functionality.  Additionally, a better graceful non disruptive fallback is now in place to prevent possible repeat.  Thanks goes to Shonie for helping debug the issue.
  4. Moved ‘visibility option’ into ‘heading text’.
  5. Fixed: restored smooth scroll effect for Internet Explorer since 1108.2 introduced ‘pathname’ checks.

If you run into issues, or have suggestions, please make them at


Table of Contents Plus 1108.2 released

1108.2 is now available on the WordPress repository.  Here are the changes:

  1. New: visibility option to show/hide the table of contents.  This option is enabled by default so if you don’t want it, turn it off in the options.  Thanks to Wafflecone and Mike for the suggestion.
  2. New: transparent presentation option added.
  3. New: custom presentation option with colour wheel for you to select your own background, border, title and link colours.  More on this below.
  4. TOC display on homepage has been disabled by default as most configurations would not require it there.  If you want to enable it, you can do so under a new advanced admin option “Include homepage”.
  5. Make smooth scrolling less zealous with anchors and be more compatible with other plugins that may use # to initiate custom javascript actions.
  6. Minor admin cross browser CSS enhancements like background gradients and indents.

Custom colours

You can now customise the background, border, title and even link colours of the table of contents by selecting the custom option for presentation.  Click on the colour wheel to select your desired customisations or enter the hex values.  Check it out below:

Back to top functionality still hasn’t been added as I’m weighing up the different ways to do it.  It will come… eventually.

If you run into issues, or have suggestions, please make them at


Table of Contents Plus 1108 released

The 1108 release is now available in the WordPress repository.  Here are the changes:

  1. New: option to hide the title on top of the table of contents.  Thanks to Andrew for the suggestion.
  2. New: option to preserve existing theme specified bullet images for unordered list elements.
  3. New: option to set the width of the table of contents.  You can select from a number of common widths, or define your own.
  4. Allow 3 to be set as the minimum number of headings for auto insertion.  The default stays at 4.
  5. Now accepts heading 1s (h1) within the body of a post, page or custom post type.
  6. Now creates new span tags for the target rather than the id of the heading.
  7. Now uses the heading as the anchor target rather than toc_index.
  8. Adjusted CSS styles for lists to be a little more consistent across themes (eg list-style, margins & paddings).
  9. Fixed: typo ‘heirarchy’ should be ‘hierarchy’.  Also thanks to Andrew.
  10. Fixed: addressed an issue while saving on networked installs using sub directories.  Thanks to Aubrey.
  11. Fixed: closing of the last list item when deeply nested.

Still to come:

  • Back to top links
  • Better customisation of colours

Table of Contents Plus 1107.1 released

The latest release (1107.1) is now available from the WordPress repository.  The changes are:

  • New: added shortcode to generate the table of contents at the preferred position. Also useful for sites that only require a TOC on a small handful of pages.
  • New: smooth scroll effect added to animate to anchor rather than jump. It’s off by default.
  • New: appearance options to match your theme a little bit more.

There are no special upgrade instructions, so head on to the repository and grab your copy or upgrade automatically via the plugin interface.

Planned for future releases:

  • Back to top links
  • Custom appearance options or maybe more selection
  • Custom width

If you run into issues, or have suggestions, please make them at