WordPress.org

Support

Support » Plugins and Hacks » Table of Contents Plus » [Plugin: Table of Contents Plus] Table of Contents not created for a page of posts

[Plugin: Table of Contents Plus] Table of Contents not created for a page of posts

  • Great plugin! Works perfectly on all basic pages however a page displaying posts or custom posts doesnt get the table of contents.

    Though the previous version of the plugin (1111) didn’t work perfectly for me (duplicate table of contents were shown and the anchor tags in the content didnt match up with one of the tables) it did create a toc on the custom posts page.

    The page i am referring to is here.

    Should the plugin actually work on pages like this?

    http://wordpress.org/extend/plugins/table-of-contents-plus/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Mike

    @conjur3r

    No it shouldn’t as it hooks into the the_content() filter which returns the content you’ve provided for that page (ie from the WYSIWYG box). If you’ve got custom code to do some more dynamic stuff, then all of that content isn’t provided to the_content.

    In order to achieve this (but not easily now), you’ll need to store the content for the page into a variable, append all of that dynamic stuff into the same variable, then feed it into a TOC+ function which will give you the table of contents. This thread talks about the last part of that process.

    That makes sense, thanks for your help.

    I decided not to implement the toc on the that specific page so its not a problem anymore.

    But if that functionality made it into the plugin i would certainly use it.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Table of Contents Plus] Table of Contents not created for a page of posts’ is closed to new replies.
Skip to toolbar