Course loop
For loop type learndash_lesson
, here are the available query arguments and fields.
Query arguments
-
author
- Include by author ID, login name, or "current"Type: string, array
-
category
- Include by category ID, slug, or "current"Type: string, array
-
child_terms
- Set "true" to include child terms for hierarchical taxonomiesType: string
-
completion_status
- Lesson completion status ('open', 'started', 'completed', 'locked')Type: string, array
-
course
- Course ID or "current" for current courseType: string
-
custom_date_field
- Filter by given custom date field - Faster than using "field", this queries raw field values in the databaseType: 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, numberType: 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 databaseType: 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, datetimeType: 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 valueType: 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 enrolledType: boolean
-
exclude
- Exclude by ID or nameType: 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 nameType: string, array
-
exclude_tag
- Exclude by tag ID, slug, or "current"Type: string, array
-
fields
- -
id
- IDType: string, array
-
ignore_sticky_posts
- Ignore sticky postsDefault:
TRUE
Type: boolean -
include
- Include by ID or nameType: string, array
-
include_children
- Include childrenType: boolean
-
name
- Name/slugType: 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, menuDefault:
title
Type: string -
orderby_field
- Order by custom fieldType: string
-
orderby_field_number
- Order by custom field whose value is a numberType: string
-
page
- Page numberDefault:
1
Type: number -
paged
- Posts per pageDefault:
-1
Type: number -
parent
- Include by parent ID or nameType: 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" attributeType: 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 fieldType: number
-
publish_year
- Filter by given publish year, or "current"Type: number
-
search
- Search by given keyword - Prepending a keyword with a hyphen "-" will exclude posts matching itType: string
-
status
- Post status: publish (default), pending, draft, future, private, trashDefault:
publish
Type: string, array -
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" attributesType: 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" attributeType: 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" attributeType: string, number, array
-
terms_2
- See attribute "terms"Type: string, number, array
-
terms_3
- See attribute "terms"Type: string, number, array
-
type
- Post type(s)Default:
post
Type: string, array -
video_exists
- Lesson video exists, true or falseType: boolean
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
-
lesson_assignments_auto_approve
- Assignment grading type(Auto-approve, Manually grade)
-
lesson_assignments_deletion
- Assignment deletion enabled
-
lesson_assignments_enabled
- Is assignment enabled
-
lesson_assignments_extensions
- Assignment file extensions limit
-
lesson_assignments_form
- Renders Assignment upload form.
-
lesson_assignments_points
- Assignment points enabled
-
lesson_assignments_points_amount
- Assignment points amount
-
lesson_assignments_size
- Assignment file size limit
-
lesson_assignments_upload
- Assignment file uploads number limit
-
lesson_drip_date
- Drip date - Optionally use "date_format" attribute
-
lesson_drip_date_future
- Drip date is in the future (after today)
-
lesson_drip_date_past
- Drip date is in the past (before and including today)
-
lesson_drip_date_timestamp
- Drip date timestamp
-
lesson_drip_enabled
- Lesson Drip enabled or not
-
lesson_has_next_lesson
- Has next lesson
-
lesson_has_previous_lesson
- Has previous lesson
-
lesson_has_section
- If Lesson has a section(if it is a first lesson under a section) - bool
-
lesson_is_sample
- If the lesson is sample or not
-
lesson_mark_complete
- Mark Complete button
-
lesson_materials
- Lesson materials
-
lesson_next_lesson_id
- Next lesson id
-
lesson_next_lesson_link
- Next lesson link
-
lesson_next_lesson_title
- Next lesson title
-
lesson_next_lesson_url
- Next lesson url
-
lesson_next_step
- Next step
-
lesson_next_step_id
- Next step Id
-
lesson_next_step_title
- Next step Title
-
lesson_next_step_url
- Next step URL
-
lesson_number_no_children
- Lesson Number relative to Course - NO Topics and Quizzes counted
-
lesson_parent_course_id
- Lesson parent Course id
-
lesson_parent_course_title
- Lesson parent Course Title
-
lesson_parent_course_url
- Lesson parent Course URL
-
lesson_previous_lesson_id
- Previous lesson id
-
lesson_previous_lesson_link
- Previous lesson link
-
lesson_previous_lesson_title
- Previous lesson title
-
lesson_previous_lesson_url
- Previous lesson url
-
lesson_previous_step
- Previous step
-
lesson_previous_step_id
- Previous step Id
-
lesson_previous_step_title
- Previous step Title
-
lesson_previous_step_url
- Previous step URL
-
lesson_progress_completed
- Lesson completed steps - Quizzes not counted as steps
-
lesson_progress_completed_q
- Lesson completed steps - Quizzes counted as steps
-
lesson_progress_percent
- Lesson progress percent - Quizzes not counted as steps
-
lesson_progress_percent_q
- Lesson progress percent - Quizzes counted as steps
-
lesson_progress_status
- Progress status: open, started, completed, or locked
-
lesson_progress_total
- Lesson total steps - Quizzes not counted as steps
-
lesson_progress_total_q
- Lesson total steps - Quizzes counted as steps
-
lesson_schedule
- Lesson schedule : After Course Enrollment - value "after_course_enrolled" / After Specific Date - value "after_specific_date"
-
lesson_section_is_expanded
- If the section is expanded - bool
-
lesson_section_order
- Section order
-
lesson_section_title
- Section title
-
lesson_section_type
- Section type
-
lesson_section_url
- Section URL
-
lesson_step_number
- Lesson Step Number relative to Course - WITHOUT Quizzes counted
-
lesson_step_number_q
- Lesson Step Number relative to Course - WITH Quizzes counted
-
lesson_time_enabled
- If Forced time enabled or not.
-
lesson_timer
- Display timer countdown.
-
lesson_video
- Renders Video.
-
lesson_video_auto_complete
- Mark the lesson as completed once the user has watched the full video.
-
lesson_video_auto_complete_delay
- Delay between video completion and lesson completion.
-
lesson_video_auto_start
- Video auto-start or not.
-
lesson_video_enabled
- Video enabled or not.
-
lesson_video_exist
- Video exists or not.
-
lesson_video_focus_pause
- Pause the video if user switches to a different window..
-
lesson_video_show_complete_button
- Display the Mark Complete button on a lesson even if not yet clickable.
-
lesson_video_show_controls
- Show Video controls or not.
-
lesson_video_shown
- Video available "before" or "after" completed sub-steps.
-
lesson_video_track_time
- Allows user to resume video position.
-
lesson_video_url
- Video URL.
-
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
-
status
- Status
-
title
- Title
-
url
- URL