Wplms Certificate starter templates

Please import these certificate templates using wordpress importer . Go to WP Admin – Tools – Import Install the WordPress importer if you need to install it. Unzip the attached file and select the xml file from unzipped attachment. Upload and you will see a custom certificate template in LMS […]

Remove admin option for instructors in course nav

Please add the given code in your wplms-cusomizer.php file wplms customizer plugin : add_action(‘wp_footer’,’course_nav_drive’); function course_nav_drive($menu){ if(!current_user_can(‘manage_options’)){ echo ‘<style>.single-course li#admin { display: none !important; }</style>’; } return $menu; } add_action(‘bp_template_redirect’,’course_nav_drive_access’,99); function course_nav_drive_access(){ if(!is_singular(‘course’)) return; global $bp; $permalinks = Vibe_CustomTypes_Permalinks::init(); if($_GET[‘action’] == ‘admin’ || bp_current_action() == ‘admin’ || $bp->unfiltered_uri[2] == ‘admin’ […]

Video player issue in unit details popup (fix)

Please add the given code in your wplms-customizer.php file in wplms-customizer plugin : add_action(‘wp_enqueue_scripts’,’add_media_css’); function add_media_css(){ if(is_singular(‘course’)){ global $post; $check =get_post_meta($post->ID ,’vibe_course_unit_content’,true); if($check==’S’){ wp_enqueue_media(); } } }  

Shortcode to show course duration in certificate

Please add the given code in your wplms-customizer.php file in wplms customizer plugin . add_shortcode(‘certificate_course_duration’, ‘vibe_certificate_course_duration’); function vibe_certificate_course_duration( $atts, $content = null ) { global $bp,$wpdb; $student_id=$_GET[‘u’]; $course_id=$_GET[‘c’]; $start_time = $wpdb->get_var($wpdb->prepare(“SELECT date_recorded FROM {$bp->activity->table_name} WHERE type =’subscribe_course’ AND item_id=%d AND component=’course’ AND (user_id=%d OR secondary_item_id=%d) ORDER BY id DESC LIMIT […]

Make user to redirect only to activate page on activation

This tip will only work with child theme . So install wplmsblankchildtheme if you are not using one . Activate the child theme then add the given code in your child theme functions.php file : add_action(‘init’,’run_custom’); function run_custom(){ $WPLMS_Actions = WPLMS_Actions::init(); remove_action(‘bp_core_activated_user’,array($WPLMS_Actions,’vibe_redirect_after_registration’),99); }  

Adding custom settings in front end

No Longer Required: Use this plugin : https://wplms.io/support/knowledge-base/wplms-course-custom-nav-plugin/ To add settings in the front end settings please refer the code : add_filter(‘wplms_course_creation_tabs’,’front_end_settings’); function front_end_settings($settings){   $prefix = ‘vibe_’;   $arr=array(array( // Text Input            ‘label’ => __(‘Custom item menu’,’vibe-customtypes’), // <label>            ‘desc’ […]

Show unit time in minutes only in curriculum

Please add the  given code in your wplms-customizer.php file in wplms customizer plugin : add_filter(‘bp_course_get_full_course_curriculum’,’wplms_set_unit_curriculum_time_to_minites_Seconds’); function wplms_set_unit_curriculum_time_to_minites_Seconds($arr){ foreach($arr as $key => $curriculum){ if($curriculum[‘type’] == ‘unit’){ $duration = get_post_meta($curriculum[‘id’],’vibe_duration’,true); $duration_parameter = apply_filters(“vibe_”.$curriculum[‘type’].”_duration_parameter”,60,$curriculum[‘id’]); $arr[$key][‘duration’] = ‘<span class=”time”><i class=”fa fa-clock-o”></i> ‘.(($duration >9998)?_x(‘Unlimited’,’Unlimited unit duration label’,’vibe’):gmdate(“i:s”, $duration*$duration_parameter)).'</span>’; } } return $arr; }