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


Source Site:

Tags: Wordpress

Link to this snippet:

Download to Code Collector

To use the direct link to your snippet on 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: 386
Date Added: 2015-10-12 10:11:13
Last Modified: 2015-10-12 04:21:28

Web Analytics