3

Allow TOC exclusion via CSS class for Core Headings

new
April 26, 2026

Dear all,

I’m looking for a way to keep my TOC clean when using long headings.

Currently, the Greenshift TOC handles this perfectly if we use the \”Advanced Heading\” block (by putting excluded text into the Subtitle field). However, for a cleaner DOM and performance optimization, I strictly prefer using Gutenberg Core Headings or Custom HTML or Element Block

I tried wrapping the text I want to hide in inside a Core Heading, hoping the TOC parser would ignore it, but it seems the logic is tied only to the Advanced Heading block.

My Proposal:
Could you update the TOC parsing logic to ignore any text wrapped in a specific class (e.g., ), regardless of the heading block used (Core, Custom HTML, etc.)?

Why this is highly beneficial:

Perfect SEO & UX Balance: We can keep long, keyword-rich H2/H3 tags for search engines, while keeping the visual TOC short and readable for users.

Performance: Advanced users can stick to native, lightweight Core blocks while still leveraging Greenshift\’s smart TOC features.

https://drive.google.com/file/d/1cuea8HS_mdZzOoqqVS8_Cn97ftTXtiFB/view?usp=sharing

https://drive.google.com/file/d/170BJsqc00rghGJDidTw8mPkH_30S5eGq/view?usp=sharing

Leave a Reply

Latest Voters