Removing Dashboard Tabs
-
Hi there,
I’m hoping to remove the tabs at the top of the student dashboard so I can create a sidebar menu instead. I found the below php code and pasted in into my divi child theme’s functions.php file but it doesn’t seem to have done anything. Can anyone let me know what I may have done wrong? Here is all the code in my funtions.php file (the first two lines were already there):
<?php
remove_filter(‘pre_user_description’, ‘wp_filter_kses’);/**
* Remove tabs from the LifterLMS Student dashboard
* @param array $tabs registered tabs
* @return array
*/
function my_remove_dashboard_tabs( $tabs ) {
// unset( $tabs[‘my-courses’] );
// unset( $tabs[‘view-achievements’] );
// unset( $tabs[‘notifications’] );
// unset( $tabs[‘edit-account’] );
// unset( $tabs[‘redeem-voucher’] );
// unset( $tabs[‘orders’] );
// unset( $tabs[‘signout’] );
return $tabs;
}
add_filter( ‘llms_get_student_dashboard_tabs’, ‘my_remove_dashboard_tabs’ );
The topic ‘Removing Dashboard Tabs’ is closed to new replies.