Support » Plugin: LifterLMS » number of enrollees

  • Resolved proyest

    (@proyest)


    It is possible to show the number of enrollees in the course …

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author Thomas Patrick Levy

    (@thomasplevy)

    @proyest,

    LifterLMS currently does not have a function designed to output this information.

    However, if you’re willing to write a bit of custom code — maybe a shortcode — you could use our student query methods to locate the information:

    
    $course_id = 123; // your course ID here
    $query = new LLMS_Student_Query( array(
    	'post_id' => $course_id,
    	'statuses' => 'enrolled'
    	'per_page' => 1, // we can only grab a single student because we'll use the total found results to display the number of actual students
    ) );
    $num_students = $query->found_results; // this will be the number of students in the course
    
Viewing 1 replies (of 1 total)
  • The topic ‘number of enrollees’ is closed to new replies.