You’re sort of asking two things here.
1 – Remove the link.
2 – Block access to the backend.
If someone is familiar with wordpress, they can still get to the backend even if you’ve removed the link to it.
Those are both WP specific questions and there are plugins for both. With that said, here’s some code to get you started.
1 – To remove the link you use $wp_admin_bar->remove_menu() in your functions.php file. Example
COPY CODE
function remove_admin_bar_links() {
global $wp_admin_bar;
$wp_admin_bar->remove_menu('wp-logo');
$wp_admin_bar->remove_menu('site-name');
$wp_admin_bar->remove_menu('new-content');
}
add_action( 'wp_before_admin_bar_render', 'remove_admin_bar_links' );
2 – I personally use the adminimize plugin to control what is displayed based on user type. https://wordpress.org/plugins/adminimize/ Its granular which makes it a bit overwhelming and probably overkill for your requirement. Do a search for either a code snippet or a simple plugin.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com