Hi Steven,
Thank you for the info, I might be doing something wrong, please see below.
MY HTML
———-
<body class=”type-post”>
….
<h2 class=”notoc”>Hello my title to skip</h2>
….
</body>
So, I tried this in functions.php
———————————–
add_filter(
‘ez_toc_exclude_by_selector’,
function( $selectors ) {
$selectors[‘notoc’] = ‘.type-post’;
return $selectors;
}
);
I was to skip all headings with the class “notoc”, But it didn’t work, I tried the reverse ($selectors[‘type-post’] = ‘notoc’;), didn’t work either.
Which class should I add as the key and which as the value? I am misunderstanding something here.
Thank you.
//SJ