can i hide or stop quiz question as a heading because i u…

closed

can i hide or stop quiz question as a heading because i uses toc as a h1 , h2 or h3 so in this pluging question title has a already h2 like this so i am in stuck please solved out it.

This thread has been imported from harmonicdesign.ca/hd-quiz/

January 16, 2023 at 2:18pmMr kunal

Hi Kunal,
I’m not 100% sure what a toc is, but I’m assuming you are referring to a Table of Contents? If so, then I’m afraid that I have no perfect solution for you. HD Quiz treats question titles as headings. This is because semantically – they ARE headings – plus this is what allows HD Quiz to integrate into any theme (inherit heading styles, fonts, colours etc).

I can only offer you three possible solutions.

First, don’t use a table of contents on a page with a quiz if possible.

Second, if it’s not possible for you to disable your table of contents on a per-page basis, then perhaps you can hide the table instead? HD Quiz has a custom hook called hdq_after where you can print custom content. Using this you can add some CSS to your site that will automatically hide the table of contents on any page where a quiz also loads. I can’t provide you with this code without seeing a link to one of your quizzes though.

And the last solution will 100% work for you, but requires you to edit the plugin. If you edit ./hd-quiz/includes/functions.php you will see a function called hdq_print_question_title. In this function, on line 687 you will see where the question title is printed out as an H3 tag. For your use case, I’d recommend changing this to a div tag instead. Just note that whenever you update HD Quiz, it will overwrite this change, so you’ll need to make the change again.

16 January 2023 — 14:32support admin Dylan

This thread has either been marked as complete or has been automatically closed due to inactivity. Please consider opening a new support thread for help.