WordPress Table of Contents Plugin (CMTOC) - How To - Exclude ACF Fields From Table Of Contents

How to exclude ACF fields from the Table of Contents Parser

Back to User Guides

What Is This Feature

When you use ACF (Advanced Custom Fields), they can contain some header tags like <h1>, <h2> etc. As the WordPress Table of Contents plugin builds its hierarchy from this type of tags, the headers from ACF fields can also be included to the table of contents. Since the version 1.5.2 there is a possibility to avoid it.

Note: this feature works only with Wysiwyg Editor type of fields.


It is easy to do. Navigate to Admin Dashboard → CM Table of Contents Pro → Settings → General Settings tab → Display Settings section.

Find there an option  ACF Fields to exclude from TOC Parser.

Area for specifing ACF fields to exclude from TOC parser - Floating Table of Contents WordPress
Area for specifing ACF fields to exclude from TOC parser

You need to write in the textarea the slugs of unwanted ACF fields to exclude them from TOC. If you need to exclude more than one field, they must be separated with a comma and without spaces as it's shown on the example below:

Adding ACF fields - WordPress TOC Plugin
Adding ACF fields

This way the content from these fields will not appear in the TOC.

How To Obtain Slugs of Field Names

Field Names can be obtained from the screen where you define the Advanced Custom Fields.

Navigate to Admin Dashboard → Custom Fields → Field Groups, hover on the needed Field Group and click Edit.

Editing ACF field group - TOC Table of Contents WordPress Plugin
Editing ACF field group

Slugs of Field Names are displayed by default in the column Name. They can be generated automatically from the name of the fields or you can set them manually.

Where to find fields names - WordPress Table of Contents
Where to find fields names

More information about the WordPress Table of Contents Plugin

Other WordPress products can be found at CreativeMinds WordPress Store

Let us know how we can Improve this Product Documentation Page

To open a Support Ticket visit our support center
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.