How do I create a table of content (toc) article?

I’m trying to create a post that is split into multiple sections. I’ve tried to follow the instructions for [toc] but can’t get it to work.

I’ve got one page with the article in it and I’ve added the [toc] code. I read that it only works if the post is published but when I tried that it still didn’t work (so I unpublished it again).

This is basically what I’ve got:

[toc 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]

Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Sed posuere     consectetur est at lobortis. Maecenas faucibus mollis interdum. Sed posuere consectetur est at lobortis. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.

‹!--nextpage--›

[toc 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]

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam quis risus eget urna mollis ornare vel eu leo.     Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Sed posuere consectetur est at lobortis.

‹!--nextpage--›

[toc 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]

Simply add this to each of your “pages” after your 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).

but it’s not working so I’d be grateful for any assistance please.

Hello Lucy,

Thanks for writing in!

Please refer following shortcode and setup TOC accordingly:

[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]

<strong>1. Introduction</strong>
Lorem ipsum dolor sit amet.

<!--nextpage-->

[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]

<strong>2. More Information</strong>
Lorem ipsum dolor sit amet.

<!--nextpage-->

[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]

<strong>3. Even More Information</strong>
Lorem ipsum dolor sit amet.

I also suggest you to take a look at TOC shortcode page for more instructions:

http://demo.theme.co/integrity-1/shortcodes/table-of-contents/

Having said that an easy to use option would be using plugins. Please take a look at following plugins to setup Table Of Contents:

Please note that the plugins I have shared is not a official Themeco advice. It’s just a personal input that I have shared with you to help you get started. 3rd party plugins may cause some issues and we won’t be able to provide support in that scenario.

Thanks.

Thank you, I’d put it on the page as HTML rather than shortcake and then paragraphs, now it’s shot code it works.

One question I do have though, is it possible to either remove the page numbers at the bottom or change the text so instead of showing Pages: 1 2 3 I can say Introduction | More Information | Even More Information

Hi Lucy,

The TOC shortcode will display the page numbers in the bottom area. Changing it could be possible with custom development, but this would be outside the scope of support we can offer. You may wish to consult a developer to assist you with this. X is quite extensible with child themes, so there are plenty of possibilities.

Thanks for understanding. Take care!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.