How to remove "view profile" and information below

Home Forums Legacy Support Support queries How-to & Troubleshooting How to remove "view profile" and information below

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #8513
    remy
    Spectator
    Hello, How to remove all the information below logout? (screenshot attached) Meaning : dashboard, courses, stats, inbox, notifications, setting I would also like to remove "view profile" Thanks
    #8682
    Anshuman Sahu
    Keymaster
    Please refer  for removing links blow username : https://wplms.io/support/knowledge-base/addedit-custom-links-in-the-logged-in-login-panel/ and add the given css to hide the "view profile "  . #vibe_bp_login li#username+li>a {     text-transform: none;     display: none; }  
    #8872
    remy
    Spectator
    Many Thanks. We now have a problem with the code, could you help us to correct it and include your function: NB: We added before functions in order to remove course details.  
    <?php if(!class_exists('WPLMS_Customizer_Plugin_Class')) { class WPLMS_Customizer_Plugin_Class  // We'll use this just to avoid function name conflicts { public function __construct(){ add_filter('wplms_course_details_widget',array($this,'custom_wplms_course_details_widget')); add_filter('wplms_course_details_widget',array($this,'remove_wplms_course_details_widget')); add_filter('wplms_course_nav_menu','wplms_course_remove_nav_section',100); add_filter('wplms_logged_in_top_menu',array($this,'loggedin_login_panel')); function wplms_course_remove_nav_section($sections){ unset($sections['events']); return $sections; } } // END public function __construct public function activate(){ // ADD Custom Code which you want to run when the plugin is activated } public function deactivate(){ // ADD Custom Code which you want to run when the plugin is de-activated } function loggedin_login_panel($loggedin_menu){ unset($loggedin_menu['stats']); // stats, courses, messages, notifications, groups return $loggedin_menu; } function custom_wplms_course_details_widget($course_details){ $key = 'price'; // Set $key value from price,precourse,time,level,seats,badge,certificate unset($course_details[$key]); return $course_details; } function remove_wplms_course_details_widget($course_details){ $key = 'time'; // Set $key value from price,precourse,time,level,seats,badge,certificate unset($course_details[$key]); return $course_details; } } // END class WPLMS_Customizer_Class } // END if(!class_exists('WPLMS_Customizer_Class')) ?>
    #9023
    Anshuman Sahu
    Keymaster
    I have edited the code please refer to the correct code :
    <?php   if(!class_exists('WPLMS_Customizer_Plugin_Class')) { class WPLMS_Customizer_Plugin_Class  // We'll use this just to avoid function name conflicts {   public function __construct(){ add_filter('wplms_course_details_widget',array($this,'custom_wplms_course_details_widget')); add_filter('wplms_course_details_widget',array($this,'remove_wplms_course_details_widget')); add_filter('wplms_course_nav_menu',array($this,'wplms_course_remove_nav_section',100)); add_filter('wplms_logged_in_top_menu',array($this,'loggedin_login_panel'));   } // END public function __construct public function activate(){ // ADD Custom Code which you want to run when the plugin is activated } public function deactivate(){ // ADD Custom Code which you want to run when the plugin is de-activated }   function loggedin_login_panel($loggedin_menu){ unset($loggedin_menu['stats']); // stats, courses, messages, notifications, groups return $loggedin_menu; } function custom_wplms_course_details_widget($course_details){ $key = 'price'; // Set $key value from price,precourse,time,level,seats,badge,certificate unset($course_details[$key]); return $course_details; } function remove_wplms_course_details_widget($course_details){ $key = 'time'; // Set $key value from price,precourse,time,level,seats,badge,certificate unset($course_details[$key]); return $course_details; } function wplms_course_remove_nav_section($sections){ unset($sections['events']);   return $sections; } } // END class WPLMS_Customizer_Class } // END if(!class_exists('WPLMS_Customizer_Class'))   ?>
    #9047
    remy
    Spectator
    Thank you the code works, but we have an other problem, to remove the login panel I put this function :
    function loggedin_login_panel($loggedin_menu){ unset($loggedin_menu['stats']); // stats, courses, messages, notifications, groups return $loggedin_menu; }
    But it obviously removes only stats, so I tried to replace 'stats' by 'courses', 'messages' etc., and that didn't work. What can I do to remove courses, messages, notifications, groups? Do I have to change the order, and put courses in first instead of stats? Thanks!!
    #9224
    Anshuman Sahu
    Keymaster
    If you want to remove multiple nav menus then please try the function like this  : function loggedin_login_panel($loggedin_menu){ unset($loggedin_menu['stats']); // stats, courses, messages, notifications, groups unset($loggedin_menu['courses']); unset($loggedin_menu['messages']); unset($loggedin_menu['notifications']); unset($loggedin_menu['groups']);  return $loggedin_menu; }  
    #9287
    remy
    Spectator
    Thank you! I've done the same thing to remove Dashboard and Settings, but only settings was removed. Can you help me to remove dashboard?  
    #9330
    deadelfujiama
    Spectator
    Hello, I would do the same thing that asks Remy but I have a problem. when I add the code page returns this error message. How can I fix?   <p class="p1"><span class="s1"><b>Fatal </b>error: Can not redeclare WPLMS_Customizer_Plugin_Class :: loggedin_login_panel () in <b>/home/lifelear/public_html/dev/wp-content/plugins/wplms-customizer/classes/customizer_class.php</b> on line <b>417</b></span></p>
    #9527
    Anshuman Sahu
    Keymaster
    Try this code to do that : In the function __constrcut :  add_filter('wplms_logged_in_top_menu',array($this,'loggedin_login_panel_new'));

    outside the __contruct function :   function loggedin_login_panel_new($loggedin_menu){

    unset($loggedin_menu['stats']); // stats, courses, messages, notifications, groups
    unset($loggedin_menu['courses']);
    unset($loggedin_menu['messages']);
    unset($loggedin_menu['notifications']);
    unset($loggedin_menu['groups']); 

    return $loggedin_menu;

     

    }

    #10431
    deadelfujiama
    Spectator
    Thanks Alex, now works
Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘How to remove "view profile" and information below’ is closed to new replies.