GS Course’s shortcode usage
[gs_courses theme="gs_course_grid_1"]
GS Course’s Shortcode attributes Usage
[gs_courses num="6" theme="gs_course_grid_1" cols="3" group="" cats_name="none" desc_limit="" order="DESC" orderby="date"]
Shortcode PHP Usage
<?php echo do_shortcode( '[gs_courses theme="gs_course_grid_1"]' ); ?>
Template Usage – Add the shortcode anywhere you need to display GS Course in template files (header.php, front-page.php, etc.)
<?php echo do_shortcode( '[gs_courses num="6" theme="gs_course_grid_1" cols="3" group="" cats_name="none" desc_limit="" order="DESC" orderby="date"]' ); ?>
No. | Attribute | Default value | options | Description |
---|---|---|---|---|
1 | num | -1 | -1 for all or any number | By default it’ll display all the Courses but you can control it by num attribute. |
2 | theme | gs_course_grid_1 | gs_course_grid_1 gs_course_horizontal_1 gs_course_horizontal_2 gs_course_list_1 gs_course_list_2 gs_course_card_1 gs_course_slider_1 gs_course_popup_1 gs_course_filter_1 | Select preferred theme to display Courses |
3 | cols | 3(4 columns) | 6 (2 Columns) 4 (3 columns) 3 (4 columns) | Number of column/s to display courses. Columns are based on 12 grids Bootstarp, so follow columns value |
4 | group | all | Course category slug, comma separated. | To get your category slug, go to GS Course > Course Group. Here you will find Course Groups & all the slugs |
5 | cats_name | intitial | none | If you display only one category’s data then no need to display category names for filtering, passing the ‘none’ value will hide the filtering section. Applicable for gs_course_filter_1 |
6 | desc_limit | 100 | Any Number | Set maximum number of characters in Course details. Default 100 |
7 | order | DESC | DESC ASC | Normally Courses will display by descending order, latest will show first. But if you wish to display ascending order, oldest at first then pass order="ASC" parameter. |
8 | orderby | date | ID title modified rand | Use preffered orderby attribute |