• Resolved edmonaft

    (@edmonaft)


    Hi there,

    I was able to hide all wordpress related buttons both at the sidebar and at the menu. This is to make sure that all functions that are available will only be for WP-ERP. However, the profile button is still present.

    Is there a way to hide or prevent the user to do changes at the Profile button of wordpress?

    Apparently, any changes I made (as an employee) gets updated at the Employees list.

    Thank you!

    • This topic was modified 6 years, 4 months ago by edmonaft.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Dear edmonaft,

    The menu you are trying to hide is a default menu of WordPress core which has nothing to do with WP ERP.

    But if you want to remove the “Edit My Profile” then you can do this following:

    go to this file location: wp-includes\admin-bar.php

    You can add this following line in admin-bar.php:

    function ya_do_it_admin_bar_remove() {
            global $wp_admin_bar;
    
            /* **edit-profile is the ID** */
            $wp_admin_bar->remove_menu('edit-profile');
     }
    
    add_action('wp_before_admin_bar_render', 'ya_do_it_admin_bar_remove', 0);

    I hope this solves your issue.

    Thank you.

    Thread Starter edmonaft

    (@edmonaft)

    hi @rafinkhan,

    Sorry for unrelated question. However, I tried adding the lines at the end of my admin-bar.php, but i am still able to see the Profile link on my regular user account.

    Dear edmonaft,

    I have already mentioned, we do not provide support for customization of any default features of WP ERP.

    However, I can suggest you to do the followings: You can try installing “Profiless” and “Capability Manager Enhanced” plugins to hide the “Profile” option based on user roles.

    Remember, WP ERP is not officially compatible with these plugins.

    Thank you.

    Thread Starter edmonaft

    (@edmonaft)

    hi @rafinkhan,

    Sorry for this and i really appreciate your continued help on this. I tired Profiless and it worked!

    Thank you very much.

    Dear edmonaft,

    I am glad that your issue is resolved.

    You can mark this “ticket” as Resolved now.

    Thank you.

    Thread Starter edmonaft

    (@edmonaft)

    Thank you again for your being helpful! ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Preven the access of WP Profile button’ is closed to new replies.