Hello there, we had talked again and you were very helpfu…
Hello there, we had talked again and you were very helpful! Now my problem is that I wanna put the quiz in that blog page (which I haven’t put in the menu yet) https://lowrider.gr/news .But when I press Start the quiz it just refreshes the page. In every other location I’ve put the quiz it works perfect (like https://lowrider.gr/more or here https://lowrider.gr/news/greek-rap/rap-anaskopisi-2020/ ) Thanks for your help.
This thread has been imported from harmonicdesign.ca/hd-quiz/
This is an interesting one, and unfortunately, there is no easy solution for you. If I were to release an update that fixed this for you, it would break it for hundreds more.
Quizzes are so complex that it is only possible to have one quiz on a page at a time – otherwise, quiz settings and things would override themselves. The problem is that some people display the full post on their blog pages – which would also render the quiz.
So what HD Quiz does is detect if it is being loaded on the archive (blog page), and if it is, then instead of loading the full quiz, just load a direct link back to the full post.
What is happening for you is that you are loading a quiz on a blog page, but in the sidebar – not attached to a post. So HD Quiz detects it is on a blog page and creates a link back to the full post. Since there is no full post, it falls back to the current page.
Looking at your site, I see that the only place you are loading HD Quiz is in your custom sidebar. This means that the best “fix” for you is to remove the “are we on a blog page” check.
Let me know if you are comfortable editing the plugin directly and I’ll let you know which file and code to edit. I’ll also add a definition
to the next version of HD Quiz that will disable that function for people like you so that you won’t have to edit the plugin each time you upgrade.
Ok I see. Yes I’m comfortable with editing whatever you tell me. Also, when I’m satisfied with the “news” page I will replace the “more” page, but I guess that doesn’t change anything about the quiz right?
STEP 1.
Edit your theme’s functions.php
and add the following definition. This will make it so that you don’t have to edit the plugin directly every time you update HD Quiz.
define("HDQ_REDIRECT", false);
STEP 2.
Now we need to edit the plugin directly. Edit ./includes/template/php
and remove line 22
hdq_print_quiz_in_loop()
and set the $buildQuiz
variable to true
Great, it worked! Thanks again for your help!
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.