Good afternoon,
Is there a way to list all the units on one page, outside of the course pages?
Thank you.
- BM
Hi,
For this you have to paste the given below code in wp-admin>plugin>editor>WPLMS customizer plugin
add_shortcode('course_timeline',function($atts,$content=null){
extract(shortcode_atts(array(
'course_id' => '',
), $atts));
$course_curriculum = bp_course_get_full_course_curriculum($course_id);
$return = '';
if(!empty($course_curriculum)){
ob_start();
echo '';
foreach($course_curriculum as $lesson){
switch($lesson['type']){
case 'unit':
?>
">
':''). $lesson['title']. (!empty($lesson['link'])?'':''),$lesson['id'],$course_id); ?>
">
':''). $lesson['title'].(isset($lesson['free'])?$lesson['free']:'') . (!empty($lesson['link'])?'':''),$lesson['id'],$course_id); ?>
';
}
$return = ob_get_contents();
ob_get_clean();
return $return;
});
After that add this short code
[course_timeline course_id=""]
and enter the id of that course.
Thank you kindly,
Can you please send the code in a text file - the formatting here is off and I have had troubles with this before.
Thank you very much.
- BM
Hi,
Please download file from link below.
Refer :
http://www.filedropper.com/code_21
This reply has been marked as private.
Well if you added this code in wplms customizer pluign then there is not need to worry .
Wplms customizer never gets update ,so your code is safe and it wont be overwritten