dozent_course_card( null $course = null, bool $echo = true )
Template function for show course card
Description
Suitable for loop a custom course query and use this function
Example usage:
dozent_course_card( $course );
See also
Parameters
- $course
-
(null) (Optional) Course Object, it could be $post object, $course object or course ID
Default value: null
- $echo
-
(bool) (Optional) Should echo or return
Default value: true
Return
(mixed|void)
Source
File: includes/template-functions.php
function dozent_course_card( $course = null, $echo = true ) { if ( $course ) { setup_postdata( $course ); } $output = dozent_load_template( 'loop/course', [],false ); if ( $course ) { wp_reset_postdata(); } if ( $echo ) { echo $output; } return $output; }
Changelog
Version | Description |
---|---|
DozentLMS 1.0.0 | Introduced. |