• Resolved dreifragezeichen

    (@dreifragezeichen)


    Hi,

    the switch to hide the “Profile” menu for users is without function. “Profile” does not disappear after deselection. It’s still shown. Any idea to fix this? Everything else works great! … except the switch to hide the “Profile” menu.

    Many thanks in advance.

    Best regards
    Nicola ??

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter dreifragezeichen

    (@dreifragezeichen)

    Solved it by myself! ??

    Plugin Author Video User Manuals

    (@videousermanuals)

    Thanks for letting us know!

    @dreifragezeichen

    Like to know how you solved it, I’m running into the same problem.

    Thanks!

    Thread Starter dreifragezeichen

    (@dreifragezeichen)

    Hi vaacum!

    I deavtivated it in this way:

    function hide_any_profile_links() { ?>
        <style type="text/css">
            a[href="https://example.com/wp-admin/profile.php"], a[href="profile.php"]{
                display: none!important;
            }
        </style>
    <?php }
    add_action('admin_head', 'hide_any_profile_links', 999);

    I used the code within the functions.php of the child theme. It works fine!

    Hope it will help you too.

    He, thanks for your answer, and sorry for the late reaction.

    When pasting this code I get a error,
    “Your changes to the PHP code were rolled back due to an error on line 7 in the wp-content/themes/child/functions.php file. Fix this and try saving again.

    syntax error, unexpected ‘}’, expecting end of file

    Thanks

    I came across this one, works a lot better:

    <?php
    add_action( ‘admin_menu’, ‘stop_access_profile’ );
    function stop_access_profile() {
    remove_menu_page( ‘profile.php’ );
    remove_submenu_page( ‘users.php’, ‘profile.php’ );
    if(IS_PROFILE_PAGE === true) {
    wp_die( ‘It is not allowed to change or view this profile information.’ );
    }
    }
    ?>

    Thread Starter dreifragezeichen

    (@dreifragezeichen)

    Hi vaacum!

    With my website the code works perfectly. Maybe incorrect function depends on some other issues which are fortunately not components of my site.

    Anyway, good you have discovered an alternative way to solve it. Now users will find two approaches here to manage the problem with the wp profile.

    correct

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘“Profile” doesn’t disappear’ is closed to new replies.