Course loop

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

Query arguments

  • access_plan - Access Plan ID(s) assigned to a course.

    Type: string, array

  • 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 - User completed the course

    Type: boolean

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

    Type: string

  • completed - User completed the course

    Type: boolean

  • 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_prerequisite - Course has prerequisite, "true"/"false"

    Type: boolean

  • has_quizzes - Course has quiz(zes), "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

  • instructor - Instructor ID(s) or "current" assigned to a course.

    Type: string, array

  • is_purchasable - Course is purcasable(at least one access plan + at least one gateway enabled), "true"/"false"

    Type: boolean

  • 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

  • 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(s) or "current" enrolled in a course.

    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" 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

  • type - Post type(s)

    Default: post
    Type: string, array

Fields

  • access_plans - Course access plans
  • 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
  • audio - Course audio embed
  • author - Author
  • author_* - Author's user field
  • available_points - Course available points
  • average_grade - Calculated value of the overall average grade of all *enrolled* students in the course.
  • average_progress - Calculated value of the overall average progress of all *enrolled* students in the course.
  • capacity - Number of students who can be enrolled in the course
  • capacity_message - Message displayed when capacity has been reached
  • categories - Course categories
  • children - Children
  • children_ids - Children IDs
  • closed_message - Message displayed to visitors when the course is accessed after the Course End Date has passed.
  • content - Course content
  • content_restricted_message - Message displayed when non-enrolled visitors try to access lessons/quizzes directly
  • difficulty - Course difficulty
  • edit_url - Edit URL
  • end_date - Date when a course closes. Students may no longer view content or complete lessons / quizzes after this date.
  • enrolled_students - Course enrolled students
  • enrollment_closed_message - Message displayed to non-enrolled visitors when the course is accessed after the Enrollment End Date has passed.
  • enrollment_end_date - After this date, registration closes
  • enrollment_opens_message - Message displayed to non-enrolled visitors when the course is accessed before the Enrollment Start Date has passed.
  • enrollment_period - Whether or not a course time period restriction is enabled, "true"/"false"
  • enrollment_start_date - Before this date, registration is closed
  • excerpt - Excerpt
  • has_capacity - Course has capacity , "true"/"false"
  • has_prerequisite - Course has prerequisite, "true"/"false"
  • id - Course ID
  • image - Featured image
  • image_* - Featured image field
  • instructors - Course instructors, instructors_assistants
  • is_prerequisite_complete - Course prerequisite completed, "true"/"false"
  • is_purchasable - Course is purcasable(at least one access plan + at least one gateway enabled), "true"/"false"
  • length - Course length string - defined in admin
  • length_seconds - Course length in seconds
  • lessons - Course lessons
  • menu_order - Menu order
  • modify_date - Modify date
  • name - name/slug
  • opens_message - Message displayed to visitors when the course is accessed before the Course Start Date has passed.
  • parent - Parent
  • parent_* - Parent field
  • parent_ids - All parent IDs from current to top
  • post_class - Post classes
  • prerequisite - Prerequisite course
  • publish_date - Publish date
  • quizzes - Course quizzes
  • sales_page_content_page_id - ID of the WP page to redirect to when $sales_page_content_type is 'page'
  • sales_page_content_type - Sales page behavior [none,content,page,url]
  • sales_page_content_url - Redirect URL for a sales page, when $sales_page_content_type is 'url'
  • sections - Course sections
  • start_date - Date when a course opens. Students may register before this date but can only view content and complete lessons or quizzes after this date.
  • status - Status
  • student_certificate_earned - Course specific student earned certificate
  • student_completed_course - Course specific student completed course, "true"/"false"
  • student_completion_date - Course specific student completion date
  • student_course_progres - Course specific student progress
  • student_enrolled - Course specific(current) student student enrolled
  • student_enrollment_date - Course specific student enrollment date
  • student_grade - Course specific student grade
  • student_last_completed_lesson - Course specific student last completed lesson
  • student_next_lesson - Course specific student next lesson
  • time_period_enabled - Course time period enabled, "true"/"false"
  • title - Title
  • url - URL
  • user_has_access - If User has access to the course, string "true"/"false"
  • video - Course video embed