Lesson loop

For loop type lifter_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 taxonomies

    Type: string

  • course - Course ID or "current" for current course where the lesson is assigned.

    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, "true"/"false"

    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 -

  • 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

  • is_available - Is lesson is available based on drip settings, "true"/"false"

    Type: boolean

  • is_complete - If the lesson has been completed by a specific user, "true"/"false"

    Type: boolean

  • is_drip_past - Is lesson drip time past, "true"/"false"

    Type: boolean

  • is_free - If the lesson is marked as "free", "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

  • quiz - Quiz ID or "current" for current quiz of the lesson it is assigned.

    Type: string

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

    Type: string

  • section - Section ID or "current" for current section where the lesson is assigned.

    Type: string

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

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

  • user - User ID.

    Type: string

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
  • audio - Lesson audio embed
  • author - Author
  • author_* - Author's user field
  • available_date - Get the date a course became or will become available according to element drip settings - if no drip, published date used
  • children - Children
  • children_ids - Children IDs
  • content - Lesson content
  • date_available - Date when lesson becomes available, applies when drip_method is "date"
  • days_before_available - The number of days before the lesson is available, applies when drip_method is "enrollment" or "start"
  • drip_method - What sort of drip method to utilize [''(none)|date|enrollment|start|prerequisite]
  • edit_url - Edit URL
  • excerpt - Excerpt
  • has_prerequisite - If Lesson has prerequisite, "true"/"false"
  • has_quiz - If Lesson has quiz, "true"/"false"
  • id - Lesson ID
  • image - Featured image
  • image_* - Featured image field
  • is_available - If Lesson is available, "true"/"false"
  • is_complete - If Lesson is completed by specific user, "true"/"false"
  • is_drip_past - If Lesson has drip is past, "true"/"false"
  • is_free - If Lesson is marked as "free", "true"/"false"
  • is_orphan - If Lesson is an orphan, "true"/"false"
  • menu_order - Menu order
  • modify_date - Modify date
  • name - name/slug
  • next_step_title - Lesson next step title
  • next_step_url - Lesson next step url
  • parent - Parent
  • parent_* - Parent field
  • parent_course - Lesson parent course
  • parent_ids - All parent IDs from current to top
  • parent_section - Lesson parent section
  • points - Number of points assigned to the lesson, used to calculate the weight of the lesson when grading courses
  • post_class - Post classes
  • prerequisite - Lesson prerequisite
  • prev_step_title - Lesson previous step title
  • prev_step_url - Lesson previous step url
  • publish_date - Publish date
  • quiz - Lesson quiz
  • require_assignment_passing_grade - If Lesson require assignment passing grade, "true"/"false"
  • require_passing_grade - If Lesson require passing grade, "true"/"false"
  • status - Status
  • time_available - Optional time to make lesson available on date_available when drip_method is "date"
  • title - Title
  • url - URL
  • user_has_access - If User has access to the lesson, string "true"/"false"
  • video - Lesson video embed