Number of students shortcode

If you want the students count in site then please add he given code in your wplms-customizer.php file at the end before ” ?> ” in wplms customzier plugin :

if(!function_exists(‘vibe_add_site_students_sc’)){

    function vibe_add_site_students_sc($attrs){

        $users = count_users();

        return $users[‘avail_roles’][‘student’]+$users[‘avail_roles’][‘subscriber’]+$users[‘avail_roles’][‘customer’];

    }

    add_shortcode(‘site_students_sc’, ‘vibe_add_site_students_sc’);

}

and then use this shortcode : 
[site_students_sc]

Leave a Reply

Your email address will not be published. Required fields are marked *