SlickQuiz Plugin WordPress, Download, Install
SlickQuiz is a plugin for displaying and managing pretty, dynamic quizzes. It uses the SlickQuiz jQuery plugin.
SlickQuiz Download Now
(If the link does not work)↓
Originals Link WordPress.org
https://wordpress.org/plugins/slickquiz/
How to Install SlickQuiz Plugin, Manually
- Install the SlickQuiz plugin directly from the WordPress plugin directory. Or upload the SlickQuiz plugin to your
/wp-content/plugins/
directory. - Activate the plugin through the “Plugins” menu in WordPress.
- Create / publish quizzes via the “SlickQuizzes” option in the WordPress sidebar.
- To add a quiz to a post or page, place
[slickquiz id=X]
the content area, whereX
is the ID of the quiz you created. The ID can be found in the main SlickQuiz listing.
Dynamic URL Shortcode Setup
You may also dynamically render a quiz by setting the shortcode to [slickquiz id=url]
. This will tell the plugin to look for an ID at the end of the page URL and select the quiz with that ID. Note: additional query string parameters will not interfere.
Text Widget Setup
To use the [slickquiz id=X]
shortcode in the sidebar Text widget, add the following to yours theme’s functions.php
file.
add_filter( 'widget_text', 'do_shortcode' )
Developer Hooks
There are currently three filter actions that you may hook into:
slickquiz_admin_options
This allows you to add custom admin options.
slickquiz_after_options
This allows you to add custom markup to the bottom of SlickQuiz Options form (you would likely add data to your custom slickquiz_admin_options
here).
slickquiz_after_result
This allows you to add custom markup to the bottom of the quiz results area at the end of the quiz (you would likely output data from your custom slickquiz_admin_options
here).
For an example of how to utilize these hooks, see this
gist.
Saving Additional Quiz Data
It is possible to store extra data along with the main quiz JSON object. This would be useful if you’re extending the quiz or integrating it with another plugin.
There is currently one JavaScript callback that you may use to add data when a quiz is saved to a draft or published. It will save extra data to an attribute named “extra” in the quiz JSON object. You would call it like below:
jQuery(document).ready(function($) { $.fn.setPreSaveQuiz(function () { // Append some "extra" data to the SlickQuiz POST. return { some: 'data', another: 'piece of data' }; }); });
There is also a slickquiz_save_quiz
WordPress action you can use to grab the quiz and extract the “extra” data when the quiz is saved to a draft or published. You might set up something like this:
class YourCustomClass { function __construct() { add_action('slickquiz_save_quiz', array( &$this, 'custom_quiz_data_action' )); } function custom_quiz_data_action( $quiz, $mode = 'create_draft' ) { $data = json_decode( $_POST['json'] ); $extra = $data->extra; // Do custom stuff } }
Note, the $mode
option will return one of the following values: ‘create_draft’, ‘create_published’, ‘update_draft’, ‘update_published’
Video
Screenshots
Plugin Not Working?
If any errors or problems with the plug-in then write comments.