Thanks for letting us know!
@dreifragezeichen
Like to know how you solved it, I’m running into the same problem.
Thanks!
Hi vaacum!
I deavtivated it in this way:
function hide_any_profile_links() { ?>
<style type="text/css">
a[href="http://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.’ );
}
}
?>
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.