If you want to hide the table of contents on specific blog posts, products, pages, or collections, you can control this with a metafield.
You can hide the TOC on specific content by setting a "The Hide TOC Metafield" on that content.
Open the target content (e.g., a blog post) in your Shopify admin
Find the Metafields section at the bottom of the page (if not visible, add it via Custom data)
Set the namespace and key
table_of_contents.hiddento a value of1(integer type)Click Save
Name: Any text of your choice
Namespace and key:
table_of_contents.hiddenType:
number_integerValue:
1
Go to Settings → Custom data
Select the content type you want to hide the TOC on(In the example screenshot, "Blog posts" is selected)
Click "Add definition"
Fill in the definition fields:
Name: Any text of your choice
Namespace and key:
table_of_contents.hiddenType: Integer (
number_integer)
Click Save