TOC On Multiple Pages: Child Page #1
DemoConfiguring the Pages
Now we can connect a few pages between themselves as a parent and child pages and configure common TOC.
First you need to navigate to Pages from the admin dashboard.
We have prepared a few pages for our example: you can see them on the screenshot below.
We gave them the relevant names to make it clear, which page will be a parent, and which will be child pages.
Parent Page
First, we will edit the page that will be a parent.
Start editing this page and find the metabox CM Table of Contents - Custom Selectors. Here you need to check the options Enable Table of Contents on this (post/page) and Add items from parent/child pages to the Table of Contents on this page.
There you can also choose how the child pages should be ordered by.
There are 5 different types of ordering in the option Which field the child pages should be ordered by:
- Post Name
- ID
- Post Title
- Date
- Page Order
And 2 options in the dropdown Order in which the child pages will be added to Table of Contents:
- ASC - Ascending order.
- DESC - Descending order.
Then save the changes. That's all settings for the parent page.
Child Pages
Then we need to edit child pages.
We have 2 pages that we are going to turn into child pages, and the process of editing them will be identical.
Let's consider this process.
While editing the page you need to find there a metabox Page Attributes. In the field Parent Page choose the page that should be a Parent (the one we defined in the previous chapter).
And, in case if you chose the Page Order type or ordering on the Parent page, here in the field Order you need to set the number - that is the number this page will be ordered in the Table of Contents. In this case it will be number 1. For another Child page it will be 2 and so on. You decide the order they will appear on the Front-end.
Then head to the metabox CM Table of Contents - Custom Selectors. Here you also need to check the options Enable Table of Contents on this (post/page) and Add items from parent/child pages to the Table of Contents on this page, and then save the changes.
Then we do the same with other pages which we need to turn into child pages.
As a result, we can see that child pages are related to the parent page.
This guide is divided to 3 pages, to demonstrate the ability of TOC to navigate between related pages.
To continue reading this guide, click on the needed chapter in TOC.
CreativeMinds Table of Contents Plugin for WordPress allows to helps users easily navigate your posts. The TOC plugin can automatically generate and insert an easy to use, user friendly navigation section to the post headers. The index makes readers’ life much easier as they can simply click on the headings to be taken to the content.
For more information go to the plugin product page
Try Other Table of Contents Demos