HD Quiz Documentation

Documentation

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

HD Quiz is a free quiz builder and one of the top-rated plugins on WordPress.org.

You can request free support, but please consider looking at the documentation first. Your Answer may lie within.

Common Features

  • Free WordPress quiz plugin with timer functionality
  • Unlimted number of quizzes, questions, and answers
  • Multiple question formats (multiple choice, image, text input, select all that apply)
  • Ability to share quiz results across social media
  • Featured images, tooltips, reusable questions and so much more!

Common Questions

Demo / Tutorial Video

About / Options Page

The About / Options page is where you can edit some General Settings as well as Translate HD Quiz into your language. This page can be accessed by going to HD Quiz ⇾ About / Options.

General Settings

click to enlarge

The general settings contain some global options that affect all quizzes. It is recommended that you pay this page a visit after first installing HD Quiz.

Social Share

  • Facebook APP ID – This feature has now been deprecated because Facebook no longer allows the sharing of custom/dynamic content.
  • Twitter Handle – You can enter your twitter handle so that HD Quiz can automatically reference you as the author when sharing via Twitter.
  • Share Text – The share text used by twitter. You can use the variables %score% and %name to reference the quiz score and the quiz name respectively.

As of HD Quiz v1.8.10, the share section will also include a button for “Web Share”. This button will only appear for compatible browsers. Web Share is a feature used primarily by smartphones to allow you to share text/links to multiple apps, including Instagram, WhatsApp, Text Message, and Email.

Other Options

  • Allow Authors Access To Create Quizzes – By default, only users with Editor access and above can create quizzes. Enable this to allow authors to create quizzes as well.
  • Enable Percent Results – By default results are only shown as a fraction x / y. Enable this to also show the percent x%.
  • Enable Legacy Scroll – Does your site use a sticky header that covers your questions? Enable this to use an older, slower scroll function – but one that allows an offset.
  • I ❤️ HD Quiz – Love HD Quiz? Enable this feature to add a subtle link to the quiz results pointing towards HD Quiz. This is a great way to help support us!
  • Replace the_content filter for quizzes – Some plugins need to automatically add content to your site. This is usualy done using WordPress’ the_content filter. This means that some plugins will also add their content to quiz results or the extra question text. Enable this to attempt to stop this behaviour.

Translations

click to enlarge

Do you need to rename a button? Do you need to translate HD Quiz into your language? This is the section you need.

  • Rename “Finish”.
  • Rename “Next”.
  • Rename “Results”.
  • Rename “Quiz Start”.
  • Rename “enter answer here”.
  • Rename “Select all that apply”.

Quiz Settings

To edit your individual quiz settings, select your desired quiz, then select the QUIZ SETTINGS tab. From here you will be able to customize most aspects of your quiz.

Results

click to enlarge
  • Quiz Pass Percentage – Change the minimum percentage of correct answers is required for the user to see the “Quiz Pass Text” content.
  • Hide all questions – Automatically hide all the questions once a quiz has been completed. This will show the results section only.
  • Quiz Pass Text – Custom content to show if a user passes the quiz. You can also place shortcodes, images, videos, buttons etc.
  • Quiz Fail Text – Custom content to show if a user fails the quiz. You can also place shortcodes, images, videos, buttons etc.

Marking

click to enlarge
  • Highlight correct / incorrect selected answers on completion – Enabled by default. Shows the user which questions they got correct, and which they got wrong.
  • Show the correct answers on completion – If the user got a question wrong, show what the correct answer was.
  • Immediately mark answer as correct or incorrect – Mark the question as soon as an answer has been selected.
  • Stop users from changing their answers – Once an answer has been selected, it cannot be changed.
  • Always Show Incorrect Answer Text – Each question can have some “Extra” text that will appear if the user got the question wrong. Enable this so that the “Extra” text appears even when the answer was correct.

Timer

click to enlarge

If the timer is enabled, quizzes will be hidden behind a “Start Quiz” button. This is so that the quiz timer does not countdown before the user is ready to begin the quiz.

  • Timer / Countdown – the time in seconds for the timer.
  • Per question – Enable if you want to timer to be per-question instead of for the whole quiz
    • BONUS: If you want to force your users to answer every question, you can set this to a high value like 999

Advanced

click to enlarge
  • Share Quiz Results – Don’t want users to be able to share their results on Facebook or Twitter? Disable this.
  • Show Results Above or Below Quiz – By default, the results are located at the top of quizzes. This is so that once a quiz has completed, we can animate the page up past the questions to the results. This is beneficial because it is an intuitive way to inform your users that not only has a quiz completed, but that they can go and review their answers (assuming you have marking enabled).
  • Randomize Question Order – Randomizes the order of questions on every page load. NOTE: You will need to exclude the page from any page caching solution you have so that the questions can still randomize.
  • Randomize Answer Order – Randomizes the order of the answers on every page load. Like above, it is best to exclude from page caching if possible.
  • Use Pool of Questions – I think this is one of the coolest and most underrated features of HD Quiz. If you have, for example, 100 questions added to a quiz, but set this to 10, then HD Quiz will randomly grab 10 questions from that pool of 100 each time it loads. Combined with “Randomize Answer Order” this allows for a near unlimited number of quiz variations!
  • WP Pagination – Don’t use this.
    • OK, I’m kidding, it’s OK to use, but because of the way that WordPress Queries work, this feature will not be compatible with some other quiz settings such as random question order or quiz timers, so use this feature at your own discretion.

Question Settings

click to enlarge

Question Title

It is recommended to only use plain text for question titles. At the end of the day, it usually results in a better user experience this way. However, for the stubborn tinkerers, you are able to use basic HTML formatting in the title such as <stong>, <em>,<sup>, <sub>, and <code>.

Question Types

HD Quiz has multiple different question types, with more planned on the way!

  • Multiple Choice: Text – Default multiple choice question type.
  • Multiple Choice: Image – Multiple choice, but each answer is also an image.
  • Select All That Apply: Text – Like multiple choice, but you can set more than one correct answer.
    • The user will need to select all of the correct answers to be awarded the point.
  • Select All That Apply: Image – coming soon™
  • Text Based Answers – User needs to type in their number.
    • This is also compatible with stemming. For example, dog* will accept “dog, doggy, doge, dogged” etc as correct answers.
  • Use Question as Title – Useful if you want to separate your questions into categories. You can use a question as a heading.

Extra

click to enlarge

First off, I’m not a fan of the name “Extra”. I feel like many of you think that there is nothing important behind here, but there is some cool stuff hidden on this tab! Things such as…

  • Paginate – Start a new page with this question. This question, and all questions below it, will be hidden behind a “next” button. Great feature for helping to categorize questions or to break up longer quizzes into shorter bites.
  • Tooltip text – You can add a tooltip to question titles to help provide some additional information or context.
  • Question Featured Image – Set a featured image for the question. The image will appear inside the question above the question title.
  • Text that appears if the user got the question wrong – This is the “Extra” text. There is also a quiz setting to force this to also appear even if the user gets the question correct.

Quizzes

A cool thing about how HD Quiz is built is that it works off of a PostCategory relationship. Just like how you can add a post to many categories on your WordPress blog, you can add the same question to multiple quizzes with HD Quiz!

Advanced

You’ve made it this far? Fantastic! It’s just you and me now, so we can get into some of the good stuff. The hidden secrets of HD Quiz. Just note that for some of these things, you will need to be able to add code to your site. So as ALWAYS, backup any file you edit first!

Secret Settings

HDQ_REDIRECT⁣ – This is a definition that will automatically redirect HD Quiz to the proper page if a quiz loads in a weird place such as a category page, search page, sidebar, etc. This is done to ensure the best compatibility, since only one quiz can be on a page at a time. If for whatever reason you need to disable this, set define('HDQ_REDIRECT', false); in your functions.php file.

HDQ_PER_PAGE⁣ – This is a definition that sets the pagination limit in the admin area of HD Quiz. If you have a lot of questions added to a single quiz, the page can get long. Set define('HDQ_PER_PAGE', 200); in your functions.php file, replace 200 with whatever number you prefer.

HDQ_MAX_ANSWERS⁣ – This is a definition that sets the max number of answers per question. By default, this is 10, but you can set define('HDQ_MAX_ANSWERS', 10); to whatever number you want in your theme’s functions.php file.

HDQ_EDIT_AUTHORED – This is a definition that makes it so that the admin quizzes page only lists quizzes authored by the current user. This combines great with the “Allow Authors Access To Create Quizzes” feature to stop users from editing each others quizzes. Admins are of course excluded from this and can always see/edit quizzes. Set define('HDQ_EDIT_AUTHORED', true); in your functions.php file. NOTE: This will only work for quizzes created with HD Quiz v1.8.10+

HDQ_FORCE_ORDER – Force query order (order of questions) on quizzes. Useful if you have another plugin or theme function that is setting query orders.

HDQ_TWITTER_SHARE_ICON – Set to true to use the old Twitter share icon instead of the new X icon. Glory to the bird!

Actions, Hooks, and Filters

hdq_before⁣ – This is an action that allows you to add custom content before a quiz. It accepts a single argument, $quiz_ID

hdq_after⁣ – This is an action that allows you to add custom content after a quiz. It accepts a single argument, $quiz_ID

hdq_after_featured_image⁣ – action allows you to add custom content after the featured image and before the question title. Super useful if you want to add some custom media like video. It accepts $question as an argument, which is an array with relevant question data such as qestion_id, quiz_id, question_type, and all other related data such as the question answers, and settings.

hdq_set_question_number_symbol – This filter allows you to override the Question Number Symbol (defaults to #)

hdq_build_quiz – This filter returns either true or false to represent if the quiz should build or not. It accepts the quiz_id as the only parameter.

Liked this article? Sharing is caring