Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

Wordpress Themes - WP Forum at BFA » Forum Usage » Forum How-To »

[SOLVED] How to Disable Admin Toolbar (top of site) for all Users Other than Admins &


  #1  
Old Mar 1, 2013, 07:10 PM
New WordPress Fan
 
141 posts · Jul 2010
Is there a simple way to disable the admin toolbar (at the top of the site) so that it will not be visible to any users other than Administrators and Editors?

I found this: http://digwp.com/2011/04/admin-bar-t...for-non-admins

But, where exactly in the functions.php file should you put their suggested code:

Code:
// show admin bar only for admins and editors
if (!current_user_can('edit_posts')) {
	add_filter('show_admin_bar', '__return_false');
}
I am using Wordpress 3.5.1 and Atahualpa 3.7.10.

Many thanks!
  #2  
Old Mar 1, 2013, 07:58 PM
juggledad's Avatar
juggledad
 
23,553 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
a 2 second google search came up with this Hide Admin Bar 2013
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old Mar 1, 2013, 10:47 PM
New WordPress Fan
 
141 posts · Jul 2010
Thank you Juggledad.

I also found this one: http://wordpress.org/extend/plugins/profile-builder/ which gives options to select levels of users who can see the admin toolbar on the front of the site.

Also, FYI - I found that the above code did work inserted toward the beginning of the Functions.php file.

Many thanks.
  #4  
Old Mar 1, 2013, 11:10 PM
lmilesw's Avatar
lmilesw
 
10,173 posts · Jul 2009
Central New York State USA
A way to add that code to the functions.php without editing the functions.php is to use the Code Snippets plugin. This way that edit won't get overwritten in a theme upgrade.
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Permission to write comments only for authors, Admins annsworld Comments, trackbacks & pings 2 Sep 21, 2011 02:29 AM
BUGFIX 353-02: Allow multi-site users to see the Atahualpa Theme Options juggledad New Versions, & Updating 0 Sep 3, 2010 09:18 AM
How I placed AddThis plugin's toolbar to the right of GD Star Rating toolbar. ymf Plugins & Atahualpa 1 Jul 24, 2010 07:07 AM
Lost my 'site admin' login on the right sidebar thotlady Header configuration & styling 1 Sep 1, 2009 03:18 PM
How to Link Page Toolbar Outside of Site tim5046 Page & Category Menu Bars 1 Jun 4, 2009 08:51 AM


All times are GMT -6. The time now is 02:04 PM.


Powered by vBulletin® Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.