Last Modified: KB » WP Tocify Pro
TOC (Table of Contents) Shortcode

Using the TOC Shortcode is completely optional. This feature allows you to have the TOC inserted into a specific location that you choose, instead of it floating left or right of the main content body in the article you're writing. This can be helpful when the default approach taken by the WP Tocify plugin (i.e., to simply float the TOC left or right) doesn't jive with the layout used in certain articles that you publish.

Using the TOC Shortcode (Instructions)

1. Insert TOC Shortcode

In any Post, you can insert [toc /] where you want the TOC to be displayed.

<div class="my-class">
    ... Lorem Ipsum ...
    [toc /]
</div>

2. Set TOC Display Setting

When creating a Post, choose the display option that tells WP Tocify to insert the TOC via the Shortcode.

TOC Widget Display Option

TOC Shortcode Attributes

float="{left|right|none}"

This defaults to none so you can display it however you like. However, if you do want to float it left or right at a specific location in your article you can set float="left" or float="right".

[toc float="right" /]

style="none"

By default, the TOC will be given some basic structural styles by the WP Tocify plugin; e.g., a border, widget, automatic text overflow and wrapping, etc. However, if you'd prefer the Shortcode to simply dump an unstyled set of <ul> list items, set style="none".

[toc style="none" /]