How to remove Admin bar from my WordPress Website?

I have create a Social Bookmarking website in WordPress Named LinkWorld.us . All functions are works fine but I cannot Remove admin bar form subscribers account. They are getting dashboard. Now that can I do?
How to remove Admin bar from my WordPress Website?

Brong Asked on October 21, 2016 in Website & Blog.
Add Comment
1 Answer(s)

Hi,
I have seen your website . www.linkworld.us is a beautiful and helpful website for all bloggers and readers. 
At first go to your theme and Functions.php file and
add the following php code in to upvote/functions.php file.

 add_action('admin_init', 'disable_admin_bar');
function disable_admin_bar() {
 if (current_user_can('subscriber')) {
 show_admin_bar(false);
 }
 }
 

Thanks for your Questions

Brong Answered on October 21, 2016.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.