Remove Admin Bar For Subscribers

Remove the admin bar for wordpress subscribers
language: PHP
license: Other

Code for Snippet:

                
// show admin bar only for admins
if (!current_user_can('manage_options')) {
	add_filter('show_admin_bar', '__return_false');
}
// show admin bar only for admins and editors
if (!current_user_can('edit_posts')) {
	add_filter('show_admin_bar', '__return_false');
}
comments powered by Disqus

Info

Tags: Wordpress

Link to this snippet:


Download to Code Collector

To use the direct link to your snippet on CodeCollector.net either copy the html from the above section or drag the Download to Code Collector to where you would like to use it.

More Info:

Times Viewed: 857
Date Added: 2013-03-08 15:03:13
Last Modified: 2013-03-15 10:23:00

Web Analytics