WordPress.org

Forums

Table of Contents Plus
Table of Contents not created for a page of posts (3 posts)

  1. TuneInTokyo
    Member
    Posted 3 years ago #

    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/

  2. Mike
    Member
    Plugin Author

    Posted 3 years ago #

    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.

  3. TuneInTokyo
    Member
    Posted 3 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Table of Contents Plus
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic