WordPress.org

Ready to get started?Download WordPress

Forums

Table of Contents Plus
TOC in archive (4 posts)

  1. Lilak
    Member
    Posted 1 year ago #

    Hello,

    your plugin is great.
    I only miss a function to display TOC on archive or category pages. Could you help me?

    Thanks again for your great work.

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

  2. Mike
    Member
    Plugin Author

    Posted 1 year ago #

    Hi - it intentionally doesn't trigger for archive/category pages as it can sometimes get a bit overwhelming having many tocs on the single page. In my opinion, this need would be rare so there isn't an admin option to allow it. That said, you can try it out by editing line 1287 of toc.php and removing:

    && !is_archive()

  3. Lilak
    Member
    Posted 1 year ago #

    Thank you,

    I tried it, but it didnt work for me. Maybe I should be more specific: I have an archive of custom posts (20 on page). Each entrys title is H1 wrapped in A. What I need is a TOC widget in my sidebar. Im reffering to this page.

    I removed && !is_archive() as you suggested, but the widget still didnt show up. I believe this would be helpful to more people, as I can see someone has already had the same issue.

    Is there any relatively easy solution to my problem?

    Thanks again for your reply!

  4. Mike
    Member
    Plugin Author

    Posted 1 year ago #

    Sorry, the plugin only works with content on a per page basis, rather than a dynamic page like a category/archive listing. The only way to get it to work right now is to obtain the entire content for the page first, then feed it into the_content which will trigger this plugin into action. You won't be able to do that without theme editing.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.