CM Table of Contents (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 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.

Settings

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.

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:

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.

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.


More information about the CM Table of Contents WordPress 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.

Still need help? Contact Us Contact Us