The Table of Contents shortcode available in X offers up some incredible SEO benefits to your standard posts and pages. It’s easy enough to paginate individual posts or pages in WordPress using the <!--nextpage--> code in the editor, but it doesn’t provide any real engaging way for your visitors to know what they’re in for as they click through to the next post. That’s where the Table of Contents shortcode comes in.

Simply add this to each of your “pages” after your <!--nextpage--> breaks and input the titles of each section in your article. What you’re left with is a thoroughly engaging, easy to navigate post structure that has been proven to increase visitor retention and keep their attention (all things Google loves).

You can easily add the Table of Contents shortcode to the left or right of your post content, or have it go full width, which is great for placing at the bottom of your posts to remind visitors of what sections are left. Click through on the table of contents shortcode above to go through to the next page and see the shortcode in action!

Code

[toc title="Table of Contents" type="left"] [toc_item title="1. Introduction" page="1"] [toc_item title="2. More Information" page="2"] [toc_item title="3. Even More Information" page="3"] [/toc]

Table of Contents Options

  • id: add a unique ID to the shortcode.
  • class: add a class or multiple classes to the shortcode.
  • style: add inline styles to the shortcode.
  • title: enter a title for the shortcode.
  • type: “left,” “right,” or “block.”
  • columns: if “block” is selected for the type attribute, choose between 1, 2, and 3 columns for your table of contents items.

Table of Contents Item Options

  • id: add a unique ID to the shortcode.
  • class: add a class or multiple classes to the shortcode.
  • style: add inline styles to the shortcode.
  • title: enter in the title you would like for your link.
  • page: enter in the page number the link should go to (i.e. “1,” “2,” 3,” et cetera).