Topic
For loop type learndash_topic
, here are the query parameters and fields.
Query parameters
author
- Include by author ID, login name, or 'current'
Type: string, arraycategory
- Include by category ID, slug, or 'current'
Type: string, arraychild_terms
- Set 'true' to include child terms for hierarchical taxonomies
Type: stringcompletion_status
- Topic completion status ('open', 'started', 'completed', 'locked')
Type: string, arraycourse
- Course ID or "current" for current course
Type: stringcustom_date_field
- Filter by given custom date field - Faster than using 'field', this queries raw field values in the database
Type: stringcustom_date_field_compare
- Compare using one of: 'equal' (default), 'not', 'before', 'before_inclusive', 'after', 'after_inclusive'
Type: stringcustom_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: stringcustom_date_field_type
- For custom date field query, one of: date (default), time, datetime, number
Type: stringcustom_date_field_value
- Filter by given custom date field value, or 'current'
Type: stringcustom_field
- Filter by given custom field - Faster than using 'field', this queries raw field values in the database
Type: stringcustom_field_2
- See attribute 'custom_field'
Type: stringcustom_field_3
- See attribute 'custom_field'
Type: stringcustom_field_compare
- Compare using one of: 'equal' (default), 'not', 'before', 'before_inclusive', 'after', 'after_inclusive'
Type: stringcustom_field_compare_2
- See attribute 'custom_field_compare'
Type: stringcustom_field_compare_3
- See attribute 'custom_field_compare'
Type: stringcustom_field_type
- For custom field query, one of: string (default), number, date, time, datetime
Type: stringcustom_field_type_2
- See attribute 'custom_field_type'
Type: stringcustom_field_type_3
- See attribute 'custom_field_type'
Type: stringcustom_field_value
- Filter by given custom field value
Type: stringcustom_field_value_2
- See attribute 'custom_field_value'
Type: stringcustom_field_value_3
- See attribute 'custom_field_value'
Type: stringenrolled
- Current user is enrolled
Type: booleanexclude
- Exclude by ID or name
Type: string, arrayexclude_author
- Exclude by author ID, login name, or 'current'
Type: string, arrayexclude_category
- Exclude by category ID, slug, or 'current'
Type: string, arrayexclude_parent
- Exclude by parent ID or name
Type: string, arrayexclude_tag
- Exclude by tag ID, slug, or 'current'
Type: string, arrayid
- ID
Type: boolean - Default: TRUEinclude
- Include by ID or name
Type: string, arrayinclude_children
- Include children
Type: booleanlesson
- Lesson ID or "current" for current lesson
Type: stringname
- Name/slug
Type: string, arrayorder
- Order: asc (ascending) or desc (descending)
Type: string - Default: TRUEorderby
- Order by one of: id, author, title, name, type, date, modified, random, comment_count, relevance, menu
Type: string - Default: titleorderby_field
- Order by custom field
Type: stringorderby_field_number
- Order by custom field whose value is a number
Type: stringpage
- Page number
Type: number - Default: 1paged
- Posts per page
Type: number - Default: -1parent
- Include by parent ID or name
Type: string, arraypublish_compare
- Publish date comparison - One of: 'before', 'before_inclusive', 'after', 'after_inclusive'
Type: stringpublish_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: stringpublish_day
- Filter by given publish day of the month, from 1 to 31, or 'current'
Type: numberpublish_month
- Filter by given publish month, from 1 to 12, or 'current'
Type: numberpublish_week
- Filter by given publish week, from 1 to 54, or 'current' - Note: the 'publish_compare' attribute is not supported for this field
Type: numberpublish_year
- Filter by given publish year, or 'current'
Type: numbersearch
- Search by given keyword - Prepending a keyword with a hyphen '-' will exclude posts matching it
Type: stringstatus
- Post status: publish (default), pending, draft, future, private, trash
Type: string, array - Default: publishtag
- Include by tag ID, slug, or 'current'
Type: string, arraytaxonomy
- Include by taxonomy ID, slug, or 'current' for taxonomy archive.Use with 'term' and 'taxonomy_compare' attributes
Type: string, numbertaxonomy_2
- See attribute 'taxonomy'
Type: string, numbertaxonomy_3
- See attribute 'taxonomy'
Type: string, numbertaxonomy_compare
- One of 'in' (default), 'not', 'and', 'exists', and 'not exists'.Use with 'taxonomy' attribute
Type: stringtaxonomy_compare_2
- See attribute 'taxonomy_compare'
Type: stringtaxonomy_compare_3
- See attribute 'taxonomy_compare'
Type: stringtaxonomy_relation
- When using more than one 'taxonomy' queries, can specify 'and' or 'or'
Type: stringterms
- Include by taxonomy term ID, slug, or 'current'.Use with 'taxonomy' attribute
Type: string, array, numberterms_2
- See attribute 'terms'
Type: string, array, numberterms_3
- See attribute 'terms'
Type: string, array, numbertype
- Post type(s)
Type: string, array - Default: postvideo_exists
- Topic video exists, true or false
Type: 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 downarchive_author
- On an author archive page: Current author as a user looparchive_post_type
- On a post type archive page: Current post type as a looparchive_term
- On a taxonomy archive page: Current taxonomy term as a loopauthor
- Authorauthor_*
- Author's user fieldchildren
- Childrenchildren_ids
- Children IDscontent
- Contentedit_url
- Edit URLexcerpt
- Excerptid
- IDimage
- Featured imageimage_*
- Featured image fieldmenu_order
- Menu ordermodify_date
- Modify datename
- name/slugparent
- Parentparent_*
- Parent fieldparent_ids
- All parent IDs from current to toppost_class
- Post classespublish_date
- Publish datestatus
- Statustitle
- Titletopic_assignments_auto_approve
- Assignment grading type(Auto-approve, Manually grade)topic_assignments_deletion
- Assignment deletion enabledtopic_assignments_enabled
- Is assignment enabledtopic_assignments_extensions
- Assignment file extensions limittopic_assignments_form
- Renders Assignment upload form.topic_assignments_points
- Assignment points enabledtopic_assignments_points_amount
- Assignment points amounttopic_assignments_size
- Assignment file size limittopic_assignments_upload
- Assignment file uploads number limittopic_has_next_topic
- Has next topictopic_has_previous_topic
- Has previous topictopic_mark_complete
- Mark Complete buttontopic_materials
- Topic materialstopic_next_step
- Next steptopic_next_step_id
- Next step Idtopic_next_step_title
- Next step Titletopic_next_step_url
- Next step URLtopic_next_topic_id
- Next topic idtopic_next_topic_link
- Next topic linktopic_next_topic_title
- Next topic titletopic_next_topic_url
- Next topic urltopic_parent_course_id
- Topic parent Course idtopic_parent_course_title
- Topic parent Course Titletopic_parent_course_url
- Topic parent Course URLtopic_parent_lesson_id
- Topic parent Lesson idtopic_parent_lesson_title
- Topic parent Lesson Titletopic_parent_lesson_url
- Topic parent Lesson URLtopic_previous_step
- Previous steptopic_previous_step_id
- Previous step Idtopic_previous_step_title
- Previous step Titletopic_previous_step_url
- Previous step URLtopic_previous_topic_id
- Previous topic idtopic_previous_topic_link
- Previous topic linktopic_previous_topic_title
- Previous topic titletopic_previous_topic_url
- Previous topic urltopic_progress_completed
- Topic completed stepstopic_progress_percent
- Topic progress percenttopic_progress_status
- Progress status: open, started, completed, or lockedtopic_progress_status_label
- Progress status label: Not Started, In Progress, Completed, or Lockedtopic_progress_total
- Topic total stepstopic_step_number_course
- Topic Step Number relative to Course - WITHOUT Quizzes countedtopic_step_number_course_q
- Topic Step Number relative to Course - WITH Quizzes countedtopic_step_number_lesson
- Topic Step Number relative to parent Lesson - WITHOUT Quizzes countedtopic_step_number_lesson_q
- Topic Step Number relative to parent Lesson - WITH Quizzes countedtopic_time_enabled
- If Forced time enabled or not.topic_timer
- Display timer countdown.topic_video
- Renders Video.topic_video_auto_complete
- Mark the topic as completed once the user has watched the full video.topic_video_auto_complete_delay
- Delay between video completion and topic completion.topic_video_auto_start
- Video auto-start or not.topic_video_enabled
- Video enabled or not.topic_video_exist
- Video exists or not.topic_video_focus_pause
- Pause the video if user switches to a different window..topic_video_show_complete_button
- Display the Mark Complete button on a topic even if not yet clickable.topic_video_show_controls
- Show Video controls or not.topic_video_shown
- Video available "before" or "after" completed sub-steps.topic_video_track_time
- Allows user to resume video position.topic_video_url
- Video URL.url
- URL