Remove Admin Bar For 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

Source Site:

http://www.codecollector.net/view/6FB59B24-B9B5-42A4-A231-816428CB86B5-519-00000286AAA0DBD7

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: 297
Date Added: 2015-10-12 10:11:13
Last Modified: 2015-10-12 04:21:28

Web Analytics