Support » Plugin: Table of Contents Plus » [Plugin: Table of Contents Plus] How to add the table of content in page templat

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

    (@conjur3r)

    Right now there isn’t an easy one function call to do what you want. If you search for function widget, the closest you’ll get is:


    $items = $tic->extract_headings( &$find, &$replace, $post->post_content );

    The first and second parameters are empty arrays, but you must supply the content for the third. $items is a HTML formatted string of list items so you’ll need to wrap starting and closing ul or ol and your divs.

    ldetomasi

    (@ldetomasi)

    Thank you very much, Michael.
    If you are going to implement this new function, I’ll wait.
    Otherwise I’ll start working on it.+
    Let me know.

    Plugin Author Mike

    (@conjur3r)

    You can try that line I sent earlier. To access $tic, you might need to add global $tic; before you use it. If you get it working, it’ll continue to work when/if a new simpler method comes around later. It’ll be in the changelog when it happens.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Table of Contents Plus] How to add the table of content in page templat’ is closed to new replies.