LifterLMS: Remove Student Dashboard Tabs You Don't Use
Hides tabs such as Redeem a Voucher, Notifications or Achievements from the LifterLMS student dashboard to keep it simple.
Opens WPIDE on
Code
if ( ! function_exists( 'llms_get_student' ) ) {
return;
}
// Tabs to remove.
$wpide_llms_hidden_tabs = array( 'redeem-voucher', 'notifications' );
add_filter( 'llms_get_student_dashboard_tabs', function ( $tabs ) use ( $wpide_llms_hidden_tabs ) {
foreach ( $wpide_llms_hidden_tabs as $tab ) {
unset( $tabs[ $tab ] );
}
return $tabs;
} );
Notes
Tab IDs include dashboard, view-courses, view-memberships, view-achievements, view-certificates, notifications, edit-account, redeem-voucher and orders.
How to add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.