-
hi
please try to add the below code
as it will work like this
http://prntscr.com/vp49b9add_filter('wplms_course_details_widget','get_course_unit_durationss' ,10,2); function get_course_unit_durationss($details,$course_id){ $course_id = get_the_ID(); $course_curriculum = bp_course_get_curriculum($course_id); if(!empty($course_curriculum)){ $duration = 0; foreach($course_curriculum as $key => $item){ if(is_numeric($item)){ $post_type = get_post_type($item); if( $post_type == 'unit' && function_exists('bp_course_get_unit_duration')){ $duration += bp_course_get_unit_duration($item); }else if($post_type == 'quiz' && function_exists('bp_course_get_quiz_duration')){ $duration += bp_course_get_quiz_duration($item); } } } if(function_exists('tofriendlytime')){ $duration = tofriendlytime($duration); } $details[]= '<li><strong class="tip" data-title="'._x("Total Unit + Quiz duration in this course","Course Detail Sidebar Unit Duration","vibe-customtypes").'">'.$duration.'</strong><i class="icon-clock-2"></i></li>'; } return $details; }
hi
I have added the code and didn’t found any fatal error
I hope you have added the code to the right place
http://prntscr.com/vpsf4yWell…my customizer looks different. See printscreen : https://prnt.sc/vpyl1z
I added the code below all.
hi
please provide details I will add the same on yours
thankshi
but I am still not able to access it
http://prntscr.com/vrq9p0If you add it through php it will just give you fatal error on site..I already tried that before..
yes but I have tried with PHP file on my local site and it is working for me so if you give us permission then let make us try with Cpanel details
You must be logged in to reply to this topic.