HD Quiz

Need to send invoices?
Check out my new WordPress plugin HDInvoice
Limited time launch sale

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

Published: January 16, 2023
Support status: 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/

thread author: Mr 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:32 support admin - Dylan

If you are enjoying HD Quiz please leave a review here on the official WordPress.org page. HD Quiz is developed by me, just some dude, and is supported and available for free. It may seem dumb, but truly nothing makes me happier than knowing that people are using and loving HD Quiz and my hard work.

This thread has either been marked as complete or has been automatically closed due to inactivity.