Is there any way to have quizes not only on singulars?

closed

Hey team
We have the structure of our website that category/taxonomy also has a lot of text and we would like to have quizes on those. But apparently the code below doesn’t allow to have it.
if (!is_singular() && HDQ_REDIRECT) { // if we are on a category, search, or home blog page // replace quiz with direct link to post or page hdq_print_quiz_in_loop(); $buildQuiz = false; } else { ... }
Is there any way to fix it (at least remove the condition for now) from your end? As a solution for later, you can add checkboxes to the backend where quizes supposed to be shown.

Thanks in advance for fast fixing

March 5, 2024 at 4:05pmOleksii

Hi Oleksii,
only one quiz can load per page. This is why those checks are there to see if we are in a loop or category page, and if we are, instead of loading a quiz we link to the post/page directly.

If you want to disable this behaviour, add the following definition to your theme’s functions.php file.

define('HDQ_REDIRECT', false);

Just note that this may cause issues if your category page has more than one quiz showing at a time.

05 March 2024 — 11:10support admin Dylan

Thank you for the hint
That also works for our website.
You can close the ticket.

Another question has been raised.
When performing quiz with pagination (next question comes only when you click Next button) is there any way to DEACTIVATE scrolling to the top of question?

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.