How do I change the number of courses shown on the Student Dashboard?

By default, three courses are shown in the My Courses section on the Dashboard for students. If you’d like to modify this, you can do so by adding this code snippet to your theme’s functions.php file or to a custom plugin.

<?php // Don't copy this line!
/**
* llms_dashboard_recent_courses_count.php
*
* @since 2017-01-07
*/
/**
* Customize the number of "recent courses" displayed on the LifterLMS Student Dashboard
* @param int $count default number of courses (3)
* @return int
*/
function my_custom_llms_dashboard_recent_courses_count( $count ) {
return 10;
}
add_filter( 'llms_dashboard_recent_courses_count', 'my_custom_llms_dashboard_recent_courses_count' );

Last Updated on
Was this article helpful?