WordPress - Remove Admin Bar For Subscribers

<?php add_action('set_current_user', 'hmk_hide_admin_bar'); function hmk_hide_admin_bar() { if (!current_user_can('edit_posts')) { show_admin_bar(false); } } ?>

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.