Headings are Headings
if you look at my website, you’ll see i’ve inserted a quiz, but it’s messed up my table of contents.
Is there a way to edit the quiz so the titles are not headings, or should i edit the table of contents so it doesn’t include the quiz
Also i have a was this helpful plugin, but it seems to appear at the end of the quiz as well! (which i would rather not have)
Help!
Hi John,
yes – headings are headings 🙂
I see you are using Easy Table of Contents. Looking them up, they have a filter to exclude headings that contain a certain selector ez_toc_exclude_by_selector
.
https://wordpress.org/support/topic/how-to-exclude-some-headings-in-toc/
I do not use that plugin so cannot test myself, but that should be able to get you exactly what you are looking for. All question titles contain the classname of hdq_question_heading
.
As for your other question, it’s probably easiest to just hide that content with css. I have a beta version of HD Quiz that utalizes the remove_all_filters
filter but it has some drawbacks so it’s not ready for production yet.
.hdq_result .daexthefu-container {display: none !important}
I added that CSS but the was this helpful still appears on the results page?
Sorry about that. It should be .hdq_results_wrapper .daexthefu-container {display: none !important}
not .hdq_result
.
Also make sure to clear your site cache after since you are using a caching plugin W3 Total Cache
I tried adding
add_filter(
‘ez_toc_exclude_by_selector’,
function( $selectors ) {
$selectors[‘hdq_question_heading’] = ‘.hdq_question_heading’;
return $selectors;
}
);
but the questions are still appearing in TOC, also the toc has 3 was this helpful thingys
yeah ok fair enough.
thank you for your help so far!
What’s the thing for results, because that’s showing in the TOC also? is that hdq_results_wrapper?
Respond to thread
This thread has been closed / marked as resolved.
You can reply to this thread, but it might be better to start a new thread if you need help.
You can also upload images to imgur and paste the links here. Just make sure that your images don't include any sensitive information.
Submit