display number of courses on dashboard
-
Yo Thomas,
I wanted to increase the number of courses displayed on the student dashboard.
Finally found the code but don’t want it to blow up when lifterlms updates.I’ve got a separate snippets plugin but the code I’m popping in there isn’t doing the trick.
It’s found on line 158 of LOCATION: lifterlms/includes/class.llms.student.dashboard.php
I’ve changed ‘3’ to ’30’/**
* Callback to output main dashboard content
* @return void
* @since 3.0.0
* @version 3.0.0
*/
public static function output_dashboard_content() {$student = new LLMS_Student();
$courses = $student->get_courses( array(
‘status’ => ‘enrolled’,
‘limit’ => apply_filters( ‘llms_dashboard_recent_courses_count’, 30 ),
) );llms_get_template( ‘myaccount/dashboard.php’, array(
‘current_user’ => get_user_by( ‘id’, get_current_user_id() ),
‘student’ => $student,
‘courses’ => $courses,
) );}
I’ve made the change in the actual .php page. It works…but how can I make this code update stick without it changin the next time lifterLMS updates. it’s not in the “functions” page and I’m now out of my scope of understanding.
I hope you can help.
Thanks
Tim
- The topic ‘display number of courses on dashboard’ is closed to new replies.