WordPress Course Catalog Plugin - Shortcodes (Adding Catalog To Website)


Shortcodes

Back to User Guide

TIP: What Are Shortcodes

Shortcodes add dynamic content to your site via a small piece of code. Learn more: Shortcodes - How To Use

To view the complete list of shortcodes of the WordPress Course Catalog plugin, head to Admin Dashboard → CM Course Catalog Pro → Shortcodes.

Navigation to the shortcodes list - WordPress Plugin for Online Courses
Navigation to the shortcodes list

Course Catalog Shortcodes

Show Single Course

  • Shortcode: [cmcc_single_course]
  • Usage: This shortcode shows a single course based on the slug passed as a parameter. 
  • Parameters:
    • slug (obligatory) - The slug of the course
  • Example: [cmcc_single_course slug="course-slug"]

Show Course Catalog

  • Shortcode: [cmcc_course]
  • Usage: This shortcode shows the Course Catalog index page. Using without parameters will display the main index page based on the plugin settings. Passing parameters allows to customise what will be displayed.
  • Parameters:
    • Content parameters (changes which courses appear)
      • catalog_id - the ID of the Catalog you want to show with the list of categories.
      • cats - the slug of the category from which the course should be displayed.
      • cmcustomtax - the slug (single or comma separated) of the Custom Taxonomy 1 from which the course should be displayed.
      • cmcustomtax2 - the slug (single or comma separated) of the Custom Taxonomy 2 from which the course should be displayed.
      • cmcustomtax3 - the slug (single or comma separated) of the Custom Taxonomy 3 from which the course should be displayed.
      • cmcustomtax4 - the slug (single or comma separated) of the Custom Taxonomy 4 from which the course should be displayed.
      • tags -the name of the tag the course displayed should have.
      • course_ids - the IDs of the course you only want to show in directory. Value should be an ID, or comma separated IDs.
      • exclude_ids - the IDs of the course you want to exclude from displaying in directory. Value should be an ID, or comma separated IDs.
    • Visual parameters (changes the visual of the catalog)
      • view - the id of the view from the following: tiles, list, directory, table (defaults to: tiles ). Note: the view table is available only in the Enterprise Edition of the WordPress Course Catalog plugin since the version 1.4.0.
      • hidesearch - whether to show the search field. Value should be 1 or 0
      • hidecategories - whether to show the categories filter. Value should be 1 or 0.
      • hidecustomtaxonomies - whether to show the Custom Taxonomy filter. Value should be 1 or 0.
      • hidetags - whether to show the tags filter. Value should be 1 or 0.
      • hidesearchby - whether to show the Search by City/Region/ZIP/State field. Value should be 1 or 0.
      • hide_filter - whether to show the filters. Value should be 1 or 0. Note: this option was introduced in version 1.3.10.
      • row_course - number of the course in the row (tiles  view only).
      • page_course - number of the course on one page.
      • only_relevant - use 1 if you like only to display the categories associated with courses in the directory in the. Value should be 1 or 0.
      • backlink - the URL of the backlink which should return the user to the main index
      • backlink_label - the label for the backlink used in the Dashboard view of the Course Catalog Index
      • readmore - the label for the button allowing to display the additional information in Course Catalog view filtered by category
      • targeturl - the URL in which the course catalog result will be displayed filtered by category (in Course Catalog view)
      • rtl - when it is enabled it will add support to right-to-left languages
      • hidecoursecode - whether to show the course code on the index. Value should be 1 or 0.
      • showdesc - whether to show the course description column. Applies for the table  view only. The value should be yes or no, default value is yes. Note: this parameter is available only in the Enterprise Edition since the version 1.4.0.
      • showcat - whether to show the category column. Applies for the table view only. The value should be yes or no, default value is yes. Note: this parameter is available only in the Enterprise Edition since the version 1.4.0.
      • showtax1 - whether to show the taxonomy 1 column. Applies for the table view only. The value should be yes or no, default value is yes. Note: this parameter is available only in the Enterprise Edition since the version 1.4.0.
      • showtax2 - whether to show the taxonomy 2 column. Applies for the table view only. The value should be yes or no, default value is yes. Note: this parameter is available only in the Enterprise Edition since the version 1.4.0.
      • showtax3 - whether to show the taxonomy 3 column. Applies for the table view only. The value should be yes or no, default value is yes. Note: this parameter is available only in the Enterprise Edition since the version 1.4.0.
      • showtax4 - whether to show the taxonomy 4 column. Applies for the table view only. The value should be yes or no, default value is yes. Note: this parameter is available only in the Enterprise Edition since the version 1.4.0.
      • showtime - whether to show the time in column. Applies for the table view only. The value should be yes or no, default value is yes. Note: this parameter is available only in the Enterprise Edition since the version 1.4.0.
  • Example: [cmcc_course showfilter="1" row_course="3" cats="1" only_relevant="0" tags="tagname" course_ids="1,3,5" exclude_ids="2,4"]

Show Custom List of Courses

  • Shortcode: [cmcc_category_list]
  • Usage: This shortcode shows a category/tag/custom taxonomy list based on passed parameters.
  • Parameters:
    • count - determines whether you want to display category elements; value should be 1 or 0
    • columns - sets the number of columns; value should be between 1-6
    • category - displays the list of Category terms; value should be 1 or 0
    • customtax - displays the list of Custom Taxonomy terms; value should be 1 or 0
    • tag - displays the list of Tag terms; value should be 1 or 0
    • hide_empty - determines whether to display categories with posts assigned; value should be 1 or 0
  • Example: [cmcc_category_list count=1 columns=3 category=1 customtax=0 tag=0 hide_empty=0]

Show Course Rating

  • Shortcode: [cmcc_cm_star_rating]
  • Usage: This shortcode shows the star rating of the course.
  • Parameters:
    • ratingfor - determines whether to show rating for specific post (post ID)
    • disablerating - determines whether to disable rating; use "1" to disable
    • hideaverage - determines whether to hide average note; use "1" to disable
    • hidecount - determines whether to hide ratings count; use "1" to disable
  • Example: [cmcc_cm_star_rating disablerating=0 hideaverage=1 hidecount=1]

Extra Catalog Page Shortcodes

The following shortcodes can only be used on the Course Page template.

  • [cmcc_categories]  - displays the categories and tags box.
  • [cmcc_post_title]  - displays post title
  • [cmcc_post_content]  - displays post content.
  • [cmcc_featured_image]  - display featured image.
  • [cmcc_back_to_index_link]  - displays back link.
  • [cmcc_page_visit]  - displays amount course page visits.
  • [cmcc_page_transition]  - displays amount course page link clicks.
  • [cmcc_page_visit_transition]  - displays amount course page visits and link clicks.

Dashboard Shortcodes

The following shortcodes require the CM Course Catalog Dashboard add-on to be installed and activated.

Display Student Dashboard

  • Shortcode: [cmcc_user_profile]
  • Usage: This shortcode shows the student dashboard on the front-end.

Display the List of Student's Courses

  • Shortcode: [cmcc_user_courses]
  • Usage: This shortcode shows the list of courses that the student has registered for. Can be used within the student dashboard.

Learn more about How To Build Student Dashboard.


Profile Fields Shortcodes

The following shortcode requires the CM Course Catalog Profile Builder add-on to be installed and activated.

Display Student Information

  • Shortcode: [cmccdb_edit_profile]
  • Usage: This shortcode shows student's profile fields which he filled during the course registration. The student can edit it in his profile. The shortcode can be used within the student dashboard.

Calendar Shortcodes

The following shortcode requires the CM Course Catalog Calendar add-on to be installed and activated.

Display Calendar

  • Shortcode: [cmcc_calendar_view]
  • Usage: This shortcode shows courses as events on the front-end. Can be displayed as a calendar or a list.
  • Parameters:
    • category - Pass course categories which should be displayed. Use the category slug and insert it into the brackets. If you pass more than one category, then separate them with comma.
    • custom-tax1 / custom-tax2 / custom-tax3 / custom-tax4 - Define custom taxonomies that should be filtered on the front-end result. Use the taxonomy slug and insert it into the brackets. If you pass more than one taxonomy, then separate them with comma.
    • view - Show your courses in the calendar or the list view. Available values are "calendar" and "list".
    • days-labels - Show the day labels and translate them into other languages.
    • mon-labels - Show the full month labels and translate them into other languages.
    • mon-short-labels - Show the short month labels and translate them into other languages.
  • Example: [cmcc_calendar_view category="book-production,coding,mathematics,science" view="calendar" custom-tax1="adult,child", custom-tax4="remote,office" days-labels="Sun,Mon,Tues,Wed,Thurs,Fri,Sat" mon-labels="January,February,March,April,May,June,July,August,September,October,November,December" mon-short-labels="Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sept,Oct,Nov,Dec"]

More information about the WordPress Course Catalog Plugin

Other WordPress products can be found at CreativeMinds WordPress Store

Let us know how we can Improve this Product Documentation Page

To open a Support Ticket visit our support center
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.