Removing Userbar Login
-
Hey there.
I’m not a big fan of the login bit on the userbar. I want members to use the bar at the top of the page for their login and logout needs.
In userbar.php, I’ve tested commenting out from “p class = avatar” all the way down to the last endif command before bp_user_bar_after. That looks like it will preserve keeping the small avatar alive on the user bar but getting rid of the login portion of the command.
But…
Am I frakking something up here? My way of learning code is to “well, what happens if we do this…” That works for simple things but complicated interactions like those in BP can actually cause a deeper problem.
Am I messing something else up if I remove that? Is there some other check that BP will do down the line that, because the login code is missing from that part of the userbar, will give me new, fresh headaches?
Is there a better way to do what I’m trying to do?
-
remove_action( 'bp_adminbar_menus', 'bp_adminbar_login_menu', 2 );
Put it into/make a file called bp-custom.php. I think it lives in /plugins/buddypress/, but I’m sure someone will correct me if it isn’t.
Wait, isn’t bp_adminbar the bar at the top? Wouldn’t I be disabling the login on the top bar instead of bp_userbar?
Sorry, read your post earlier as that top bar! Oops!
I guess the easiest way to do this, would be to edit the userbar.php file in your active member theme, and replace everything between…
<?php else : ?>
and…
<?php endif ?>
Remember that commenting out the HTML doesn’t stop the PHP from getting processed, so all of the “_e”‘s are getting echo’ed even though you commented out the HTML.
Thanks J^3.
By doing this, I also learned how the optionsbar and the userbar play together.
Thanks J^3.
By doing this, I also learned how the optionsbar and the userbar play together.
Hi Jodyw1!
Can you please show how you did that? I’m trying to remove some things from the userbar as well. Activity and log out/in has to go (but I still want the functionality).
Tore
Found the answer here:
https://buddypress.org/forums/topic/how-can-i-remove-logout-link-from-the-userbar
I just found out a much simpler way to do this. Edit base.css like below. Just add display : none.
#userbar ul li a#my-activity {
-moz-background-clip:border;
-moz-background-inline-policy:continuous;
-moz-background-origin:padding;
background:transparent url(../images/icons/activity_bullet.gif) no-repeat scroll 16px 50%;
display:none;
}
- The topic ‘Removing Userbar Login’ is closed to new replies.