PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

Removing the Admin bar for members

s2Member Plugin. A Membership plugin for WordPress®.

Removing the Admin bar for members

Postby drbyte » March 28th, 2011, 10:22 pm

Hey Jason

Maybe you can have an option to remove the WP top admin/user bar in your next release...Not sure why WP don't have an option for that but I find it really annoying....and somehow branding your site as everybody else.

I know you can remove it by editing each user option but If you have thousands it will be impossible unless you inject the db....

Here is a temp solution i found but It would be nice if you can come up with something..

in your functions.php

add this line on top

Code: Select all
<?php
function my_function_admin_bar($content) {
    return ( current_user_can("administrator") ) ? $content : false;
}
add_filter( 'show_admin_bar' , 'my_function_admin_bar');
?>


that will remove the top admin bar to all users...Not for the admin...this way you still have access to it's usability

Sam

P.S. Please look into my other post Jason...Thank you
http://www.primothemes.com/forums/viewtopic.php?f=4&t=2838
User avatar
drbyte
Experienced User
Experienced User
 
Posts: 269
Joined: May 6, 2010

Re: Removing the Admin bar for members

Postby Cristián Lávaque » March 28th, 2011, 11:19 pm

Thank you drbyte! :)

I had also wanted to solve this problem before and Jason showed me this plugin that removes it https://wordpress.org/extend/plugins/disable-admin-bar/
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Removing the Admin bar for members

Postby 16k_zx81 » August 31st, 2011, 12:32 am

Christian is this still the preferred solution for S2M to remove the Admin Bar for non-Admin members?
User avatar
16k_zx81
Registered User
Registered User
 
Posts: 29
Joined: August 12, 2011

Re: Removing the Admin bar for members

Postby Cristián Lávaque » August 31st, 2011, 8:25 pm

It's not that it's preferred by s2Member, it's just that s2Member doesn't deal with that. That's the plugin I'm using to remove the bar in one of my websites and it works.

I hope that helps. :)
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Removing the Admin bar for members

Postby 16k_zx81 » August 31st, 2011, 8:31 pm

Yes it does :) Thats all I needed to know

Thanks Christian
User avatar
16k_zx81
Registered User
Registered User
 
Posts: 29
Joined: August 12, 2011

Re: Removing the Admin bar for members

Postby Cristián Lávaque » September 1st, 2011, 1:20 pm

Cool. :)
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Removing the Admin bar for members

Postby weblantis » November 22nd, 2011, 2:25 pm

I found that this also works really well:

http://wordpress.org/extend/plugins/wp- ... admin-bar/

It lets you enable/disable admin on user level by level basis.
User avatar
weblantis
Registered User
Registered User
 
Posts: 3
Joined: November 20, 2011

Re: Removing the Admin bar for members

Postby 16k_zx81 » November 22nd, 2011, 3:17 pm

ah thats brilliant!

I had it disabled, because I didnt know of any other option

this fixes the problem and I can have my admin bar back now when using the site

thanks a heap for posting!
User avatar
16k_zx81
Registered User
Registered User
 
Posts: 29
Joined: August 12, 2011


Return to s2Member Plugin

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 2 guests

cron