• Resolved Maja

    (@hutamanama)


    How to remove the dashboard tab from the user profile, I use [learn_press_profile]. Hiding with CSS is not working because this is the first tab and then is nothing active.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @hutamanama
    You can add this code to function.php of theme or child-theme

    
     //hide tab in page profile
     if ( !function_exists( 'thim_remove_tabs_course_profile' ) ) {
    	function thim_remove_tabs_course_profile( $defaults ) {
    		//Example remove gradebook
    		unset( $defaults['gradebook'] );
    		//remove assignment
    		unset( $defaults['assignment'] );
    		//remove assignment
    		unset( $defaults['withdrawals'] );
     		unset( $defaults['orders'] );
    		unset( $defaults['wishlist'] );
    		unset( $defaults['settings'] );
    		unset( $defaults['certificates'] );
    		unset( $defaults['quizzes'] );
    		unset( $defaults['instructor'] );
    		unset( $defaults['courses'] );
    		return $defaults;
    	}
    }
    add_filter( 'learn-press/profile-tabs', 'thim_remove_tabs_course_profile', 1001 );
    
    Thread Starter Maja

    (@hutamanama)

    Thanks ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Learnpress user profile – remove dashboard’ is closed to new replies.