Course loop

For loop type learndash_quiz, here are the available query arguments and fields.

Query arguments

  • all_quizzes - Whether to return all quizzes(eg. for a Course ID to return all Course, Lessons and Topics quizzes

    Type: boolean

  • author - Include by author ID, login name, or "current"

    Type: string, array

  • category - Include by category ID, slug, or "current"

    Type: string, array

  • certificate_earned - Quiz Certificate earned or not

    Type: boolean

  • child_terms - Set "true" to include child terms for hierarchical taxonomies

    Type: string

  • course - Course ID or "current" for current course

    Type: string

  • custom_date_field - Filter by given custom date field - Faster than using "field", this queries raw field values in the database

    Type: string

  • custom_date_field_compare - Compare using one of: "equal" (default), "not", "before", "before_inclusive", "after", "after_inclusive"

    Type: string

  • custom_date_field_format - For custom date field query, specify the date format of the field value - Default is "Ymd"; For date-time field, set "Y-m-d H:i:s". If it's a timestamp, use "timestamp". For custom field plugins other than ACF, you may need to use a different format.

    Type: string

  • custom_date_field_type - For custom date field query, one of: date (default), time, datetime, number

    Type: string

  • custom_date_field_value - Filter by given custom date field value, or "current"

    Type: string

  • custom_field - Filter by given custom field - Faster than using "field", this queries raw field values in the database

    Type: string

  • custom_field_2 - See attribute "custom_field"

    Type: string

  • custom_field_3 - See attribute "custom_field"

    Type: string

  • custom_field_compare - Compare using one of: "equal" (default), "not", "before", "before_inclusive", "after", "after_inclusive"

    Type: string

  • custom_field_compare_2 - See attribute "custom_field_compare"

    Type: string

  • custom_field_compare_3 - See attribute "custom_field_compare"

    Type: string

  • custom_field_type - For custom field query, one of: string (default), number, date, time, datetime

    Type: string

  • custom_field_type_2 - See attribute "custom_field_type"

    Type: string

  • custom_field_type_3 - See attribute "custom_field_type"

    Type: string

  • custom_field_value - Filter by given custom field value

    Type: string

  • custom_field_value_2 - See attribute "custom_field_value"

    Type: string

  • custom_field_value_3 - See attribute "custom_field_value"

    Type: string

  • enrolled - Current user is enrolled

    Type: boolean

  • exclude - Exclude by ID or name

    Type: string, array

  • exclude_author - Exclude by author ID, login name, or "current"

    Type: string, array

  • exclude_category - Exclude by category ID, slug, or "current"

    Type: string, array

  • exclude_parent - Exclude by parent ID or name

    Type: string, array

  • exclude_tag - Exclude by tag ID, slug, or "current"

    Type: string, array

  • fields -

  • has_certificate - Whether the Quiz has certificate, true/false

    Type: boolean

  • has_prerequisite - Whether the Quiz has prerequisite, true/false

    Type: boolean

  • id - ID

    Type: string, array

  • ignore_sticky_posts - Ignore sticky posts

    Default: TRUE
    Type: boolean

  • include - Include by ID or name

    Type: string, array

  • include_children - Include children

    Type: boolean

  • lesson - Lesson ID or "current" for current lesson

    Type: string

  • name - Name/slug

    Type: string, array

  • order - Order: asc (ascending) or desc (descending)

    Default: asc
    Type: string

  • orderby - Order by one of: id, author, title, name, type, date, modified, random, comment_count, relevance, menu

    Default: title
    Type: string

  • orderby_field - Order by custom field

    Type: string

  • orderby_field_number - Order by custom field whose value is a number

    Type: string

  • page - Page number

    Default: 1
    Type: number

  • paged - Posts per page

    Default: -1
    Type: number

  • parent - Include by parent ID or name

    Type: string, array

  • publish_compare - Publish date comparison - One of: "before", "before_inclusive", "after", "after_inclusive"

    Type: string

  • publish_date - Filter by publish date in Y-M-D format, "today", "X days ago" and other values compatible with strtotime() - Optionally use "publish_compare" attribute

    Type: string

  • publish_day - Filter by given publish day of the month, from 1 to 31, or "current"

    Type: number

  • publish_month - Filter by given publish month, from 1 to 12, or "current"

    Type: number

  • publish_week - Filter by given publish week, from 1 to 54, or "current" - Note: the "publish_compare" attribute is not supported for this field

    Type: number

  • publish_year - Filter by given publish year, or "current"

    Type: number

  • quiz_status - Quiz Status for the User: 'completed', 'started', 'locked', 'open'

    Type: string, array

  • search - Search by given keyword - Prepending a keyword with a hyphen "-" will exclude posts matching it

    Type: string

  • status - Post status: publish (default), pending, draft, future, private, trash

    Default: publish
    Type: string, array

  • student - Student ID or "current" who has quiz started

    Type: string

  • tag - Include by tag ID, slug, or "current"

    Type: string, array

  • taxonomy - Include by taxonomy ID, slug, or "current" for taxonomy archive
    Use with "term" and "taxonomy_compare" attributes

    Type: string, number

  • taxonomy_2 - See attribute "taxonomy"

    Type: string, number

  • taxonomy_3 - See attribute "taxonomy"

    Type: string, number

  • taxonomy_compare - One of "in" (default), "not", "and", "exists", and "not exists"
    Use with "taxonomy" attribute

    Type: string

  • taxonomy_compare_2 - See attribute "taxonomy_compare"

    Type: string

  • taxonomy_compare_3 - See attribute "taxonomy_compare"

    Type: string

  • taxonomy_relation - When using more than one "taxonomy" queries, can specify "and" or "or"

    Type: string

  • terms - Include by taxonomy term ID, slug, or "current"
    Use with "taxonomy" attribute

    Type: string, number, array

  • terms_2 - See attribute "terms"

    Type: string, number, array

  • terms_3 - See attribute "terms"

    Type: string, number, array

  • topic - Topic ID or "current" for current topic

    Type: string

  • type - Post type(s)

    Default: post
    Type: string, array

Fields

  • all - Show all custom fields (for development purpose)
  • ancestors - Ancestor posts from lowest to highest level; Set reverse=true to go from top-level down
  • archive_author - On an author archive page: Current author as a user loop
  • archive_post_type - On a post type archive page: Current post type as a loop
  • archive_term - On a taxonomy archive page: Current taxonomy term as a loop
  • author - Author
  • author_* - Author's user field
  • children - Children
  • children_ids - Children IDs
  • content - Content
  • edit_url - Edit URL
  • excerpt - Excerpt
  • id - ID
  • image - Featured image
  • image_* - Featured image field
  • menu_order - Menu order
  • modify_date - Modify date
  • name - name/slug
  • parent - Parent
  • parent_* - Parent field
  • parent_ids - All parent IDs from current to top
  • post_class - Post classes
  • publish_date - Publish date
  • quiz_anker_box - Renders Quiz Anchor tag Box
  • quiz_answer_feedback_enabled - Custom Answer Feedback enabled - "true" or "false"
  • quiz_autostart - Quiz autostart - "true" or "false"
  • quiz_certificate_data - Quiz Certificate data loop
  • quiz_certificate_id - Quiz Certificate ID
  • quiz_certificate_threshold_decimal - Score needed to receive a certificate - decimal number
  • quiz_certificate_threshold_percent - Score needed to receive a certificate - percentage
  • quiz_certificate_url - Quiz Certificate URL
  • quiz_custom_fields_activated - Quiz Custom fields Form activated - "true" or "false"
  • quiz_custom_form - Renders Quiz Custom fields Form
  • quiz_custom_form_position - Custom Form position - '0'- On the quiz startpage, '1'- At the end of the quiz (before the quiz result)
  • quiz_disable_answer_mark - Correct / Incorrect Answer Marks disabled - "true" or "false"
  • quiz_display_all - Renders the Whole Quiz
  • quiz_force_question_complete - Quiz Questions required to complete - "true" or "false"
  • quiz_has_certificate - Quiz has Certificate - "true" or "false"
  • quiz_has_prerequisite - Quiz prerequisite set - "true" or "false"
  • quiz_hide_answer_message_box - Correct / Incorrect Messages hidden - "true" or "false"
  • quiz_hide_correct_questions - Hide number of correctly answered Questions on the Result page - "true" or "false"
  • quiz_hide_result_points - Hide achieved Quiz score on the Result page - "true" or "false"
  • quiz_hide_result_time - Hide Quiz Time on the Result page - "true" or "false"
  • quiz_hide_view_question - View Questions Button hidden - "true" or "false"
  • quiz_info_page_box - Renders Quiz Info Page Box
  • quiz_load_box - Renders Quiz Loading Box
  • quiz_lock_box - Renders Quiz Locked Box(already completed the quiz before)
  • quiz_materials - Quiz materials
  • quiz_next_step_id - Next step Id
  • quiz_next_step_title - Next step title
  • quiz_next_step_url - Next step URL
  • quiz_only_registered_box - Renders Quiz Only Registered User Box
  • quiz_only_registered_users - Only authenticated users can take the Quiz - "true" or "false"
  • quiz_parent_course_id - Parent Course Id
  • quiz_parent_course_title - Parent Course Title
  • quiz_parent_course_url - Parent Course URL
  • quiz_parent_lesson_id - Parent lesson Id
  • quiz_parent_lesson_title - Parent lesson Title
  • quiz_parent_lesson_url - Parent lesson URL
  • quiz_parent_topic_id - Parent topic Id
  • quiz_parent_topic_title - Parent topic Title
  • quiz_parent_topic_url - Parent topic URL
  • quiz_passing_percentage - Quiz Passing Score/Percentage
  • quiz_prerequisite_box - Renders Quiz Prerequisite Box
  • quiz_prerequisites - Quizzes that must be completed prior to taking the quiz
  • quiz_prev_step_id - Previous step ID
  • quiz_prev_step_title - Previous step title
  • quiz_prev_step_url - Previous step URL
  • quiz_question_answer_random - Quiz Additional Question Options : Random answers order- "true" or "false"
  • quiz_question_display_single_feedback - Quiz question feedback display. end = Display results at the end only (default), each = Display results after each submitted answer
  • quiz_question_display_single_feedback_back_button - Quiz question feedback button display - empty or "on"
  • quiz_question_display_type - Quiz questions display type. "single": one questionat a time or "multiple": all questions at once
  • quiz_question_hide_numbering - Quiz Additional Question Options : Hide Question numbering- "true" or "false"
  • quiz_question_numbered_answer - Quiz Additional Question Options : Numbered answers- "true" or "false"
  • quiz_question_show_category - Quiz Additional Question Options : Show category - "true" or "false"
  • quiz_question_show_points - Quiz Additional Question Options : Show points - "true" or "false"
  • quiz_restart_quiz_hidden - Restart Quiz button - "true" or "false"
  • quiz_result_grade_enabled - Quiz Result Messages enabled - "true" or "false"
  • quiz_result_messages - Quiz Result Messages display - list loop of "percent"/"text" pairs
  • quiz_retries_applicable_to - Quiz Retries Applicable to: '1'- All users, '2'- Registered only, '3' - Anonymous only
  • quiz_retry_repeats - Number of Retries Allowed - default "0" for unlimited
  • quiz_retry_restrictions - Quiz retakes restricted - "true" or "false"
  • quiz_show_add_toplist_box - Renders Quiz Add to Toplist Box
  • quiz_show_average_result - Display the average score of all users who took the quiz - "true" or "false"
  • quiz_show_category_score - Display the score achieved for each Question Category - "true" or "false"
  • quiz_show_check_page_box - Renders Quiz Summary Box
  • quiz_show_max_question - Renders Quiz all/subset Questions Box
  • quiz_show_quiz_box - Renders Quiz Content Box
  • quiz_show_result_box - Renders Quiz Results Box
  • quiz_show_review_box - Renders Quiz Review Box
  • quiz_show_review_question - Quiz show review question table - "true" or "false"
  • quiz_skip_question_disabled - Quiz Skip question button a disabled - "true" or "false"
  • quiz_start_box - Renders Quiz Start Box
  • quiz_status - Quiz status - "completed, started, locked, open"
  • quiz_step_number_course - Quiz Step Number relative to Course
  • quiz_step_number_lesson - Quiz Step Number relative to parent Lesson
  • quiz_step_number_topic - Quiz Step Number relative to parent Topic
  • quiz_submitted_essays - Submitted Essays loop
  • quiz_summary_hide - Quiz Summary table before submission hidden - "true" or "false"
  • quiz_time_limit - Quiz Time Limit in seconds
  • quiz_time_limit_box - Renders Quiz Time Limit Box
  • quiz_time_limit_enabled - Quiz time limit enabled - "true" or "false"
  • quiz_toplist_access - Who can apply to Quiz Leaderboard - '1'- All users, '2'- Registered only, '3' - Anonymous only
  • quiz_toplist_activated - Quiz Leaderboard activated - "true" or "false"
  • quiz_toplist_auto_add - Quiz Leaderboard Automatic user entry - "true" or "false"
  • quiz_toplist_display_enabled - Quiz Leaderboard Display on Quiz results page enabled - "true" or "false"
  • quiz_toplist_display_limit - Quiz Leaderboard Number of displayed entries - default '0' for all
  • quiz_toplist_display_position - Quiz Leaderboard Display on Quiz results page position - '1'- Below the result text, '2'- In a button
  • quiz_toplist_in_button_box - Renders Quiz In Button position Box
  • quiz_toplist_multi_apply - Quiz Leaderboard Multiple Applications per user enabled - "true" or "false"
  • quiz_toplist_re_apply - Quiz Leaderboard Re-apply after - in minutes
  • quiz_toplist_sort_by - Quiz Leaderboard Sort list by - '1'- Best user, '2'- Newest entry, '3' - Oldest entry
  • quiz_wrap_close - Renders Quiz Wrapper Close tag - needed for quiz to function
  • quiz_wrap_open - Renders Quiz Wrapper Open tag - needed for quiz to function
  • status - Status
  • title - Title
  • url - URL