Table of Contents Plus
Some changes we made, that you might consider (2 posts)

  1. boxcarpress
    Posted 3 years ago #

    Thought I'd paste some of our plugin modifications here, in case you might add them to the trunk's code.


    $this->path = plugins_url( '', __FILE__ );

    The plugin's reliance on WP_PLUGIN_URL means that SSL throws errors.


    wp_register_style( 'toc-screen', $this->path . '/screen.css', array(), '1211' );
    wp_register_script( 'toc-front', $this->path . '/front.js', array('jquery'), '1211', true );

    Put the script in to the footer, version stamp the version you're using whenever you update. The option to put the script at the bottom could come from the Settings page. The version number is semi-important when upgrading the plugin on servers that cache aggressively.


    $html .= '<ul class="toc_list"><li><a href="#">'.get_the_title().'</a></li>' . $items . '</ul></div>' . "\n" . $items . '</ul></div>' . "\n";

    This adds the title of the page to the TOC. Again, a nice option from the Settings page. This suits our heading structure well. Perhaps there's another way to include the page's <h1> on the TOC?


  2. Mike
    Plugin Author

    Posted 3 years ago #

    1211 introduced the %PAGE_TITLE% variable which you can place at the desired position of the TOC title to do exactly what you wanted with the last change. See the changelog.

    Good point re SSL and caching.

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


No tags yet.