Browse: Home / Functions /

ld_course_list

ld_course_list( array $attr = array(),  string $content = '' )

Builds the [ld_course_list] shortcode output.


Description #


Parameters #

$attr

(array) (Optional) An array of shortcode attributes.

  • 'include_outer_wrapper'
    (string) Whether to include outer wrapper. Default 'true'.
  • 'paged'
    (int) Is the query paged. Default false.
  • 'post_type'
    (string) Post type slug. Default 1.
  • 'post_status'
    (string) The post status. Default 'publish'.
  • 'order'
    (string) Designates ascending ('ASC') or descending ('DESC') order. Default 'DESC'.
  • 'orderby'
    (string) The name of the field to order posts by. Default 'ID'.
  • 'user_id'
    (int|false) User ID. Default false
  • 'mycourses'
    (string) Type of courses. Can be 'enrolled', 'not-enrolled'. Default null
  • 'status'
    (string) Status of the course. Default null
  • 'post__in'
    (string) List of posts IDs to check. Default null.
  • 'course_id'
    (string) Course ID
  • 'meta_key'
    (string) Meta key
  • 'meta_value'
    (string) Meta Value.
  • 'meta_compare'
    (string) Meta compare operator
  • 'tag'
    (string) Tag slug. Comma-separated (either), Plus-separated (all).
  • 'tag_id'
    (int|array) An array of tag ids (AND in). Default 0.
  • 'tag__and'
    (string|array) An array of tag ids (AND in).
  • 'tag__in'
    (string|array) An array of tag ids (OR in).
  • 'tag__not_in'
    (string|array) An array of tag ids (NOT in).
  • 'tag_slug__and'
    (string|array) An array of tag slugs (AND in).
  • 'tag_slug__in'
    (string|array) An array of tag slugs (OR in).
  • 'cat'
    (string) Category ID or comma-separated list of IDs (this or any children).
  • 'category_name'
    (string) Use category slug (not name, this or any children). Default 0.
  • 'category__and'
    (string|array) An array of category IDs (AND in).
  • 'category__in'
    (string|array) An array of category IDs (OR in, no children).
  • 'category__not_in'
    (string|array) An array of category IDs (NOT in).
  • 'tax_compare'
    (string) Taxonomy compare operator. Default 'AND'
  • 'categoryselector'
    (string) Category selector.
  • 'show_thumbnail'
    (string) Whether to show thumbnail. Default 'true'.
  • 'show_content'
    (string) Whether to show content. Default 'true'.
  • 'author__in'
    (string) An array of author IDs to query from.
  • 'col'
    (string) Column. Default empty
  • 'progress_bar'
    (string) Whether to show progress bar. Default 'false'.
  • 'array'
    (boolean) Unused. Default false.
  • 'course_grid'
    (string) Whether to show progress bar. Default 'true'.
  • 'price_type'
    (string|array) An array of price types to show.

Default value: array()

$content

(string) (Optional) The shortcode content.

Default value: ''


Return #

(string) The ld_course_list shortcode output.


Source #

File: includes/shortcodes/ld_course_list.php


Changelog #

Changelog
Version Description
2.1.0 Introduced.