Table of content exclude

Is it working or am I doing something wrong? (under Logic - You can exclude certain headings by adding the attribute “brf-toc-exclude” to the heading.) Atribute is there but still shows under TOC

Example:

<h3 class="brf-toc-exclude">Some title</h3>

Hi @hech,

a data attribute is not a class. You have to add it here:

Let me know if that works for you :slight_smile:

Hello there!

hm… so it works only with Bricks headings in posts? Single post template source for all my posts is Wordpress (not Bricks).
Is there shortcode for TOC so I can place it inside classic editor in posts where I want TOC be showed? (I have lots of posts archive with wrong heading styles and don’t want to have TOC on such posts)

Thanks !

The TOC will recognize all types of content output, also Gutenberg. You just have to use the Gutenberg way to give your heading you want to exclude the data attribute. It’s not a Bricks related thing, it’s just HTML. Maybe there are some Gutenberg people here which can help on this.

To show the TOC on all of your posts or pages, just include it to your post / page template above the “Post Content” element. Then it will appears for all pages which matches with the template condition and recognize their headlines. No need to add it to each Gutenberg post content :wink: To show the TOC only for selected pages or exclude it for specific posts / pages, you could use Bricks Display Conditions, for example by adding a post category “Exclude TOC” and show this element only for posts which do not have this category selected. Just as one idea of many :slight_smile:

Thanks a lot! I already have TOC in template but didn’t know how to solve that old posts to show them without TOC… almost forgot about “new” Bricks feature of conditional logic :slight_smile:

1 Like