Skip to:
Content
Pages
Categories
Search
Top
Bottom

How can I remove Logout link from the userbar?

  • Avatar of Robert
    Robert
    Participant

    @rdob

    Hi Everyone,

    I have a question. Is there a simple way to remove the logout link which is in the user bar (member theme far left column) or do I have to manually remove it from bp_get_nav function in the core?

    I just wish there would be an easy way without the need of hacking the core.

    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • Avatar of John James Jacoby
    John James Jacoby
    Keymaster

    @johnjamesjacoby

    I would copy the entire bp_get_nav function except the final part where it adds the logout link, and make your own function called bp_get_nav_no_logout, and put that function in your bp-custom.php file.

    This way you can modify the member theme instead of the core files.

    Take this a step further and make your own member theme, that way you’re not modifying the stock member theme either.

    If you feel like this is something you’d like to have more control over in the future, add it to the trac as a feature enhancement. I could see being able to hook into those functions or modify their behavior as having its benefits.

    Avatar of Robert
    Robert
    Participant

    @rdob

    Thanks JJJ,

    I’ll definitely try this.

    I am actually working on a member theme for my site (I’ll reveal the url later) so this is a great solution. I’m more of a design guy not so strong in coding but this is something I should be able to do.

    I appreciate your help.

    Avatar of Robert
    Robert
    Participant

    @rdob

    In case others are curious here’s what I did:

    I copied the function bp_get_nav removed the lines with the logout link and renamed it to bp_get_nav_no_logout as suggested above by jjj. Then I put this newly created function in the functions.php file in my theme and I changed the userbar.php file to call bp_get_nav_no_logout.

    That way I keep it with my custom theme and leave the core files untouched.

    Thanks again John.

    Hi,

    Where is the core? It is mentioned everywhere in this forum and I can’t find it for the life of me. As a result, I am stuck, unable to follow the wonderful suggestions here.

    I am using WordPress MU 2.7.1 and Buddypress 1.0.1

    Thanks,

    Brian

    Avatar of Jeff Sayre
    Jeff Sayre
    Participant

    @jeffsayre

    Brian-

    I see that you are new to the BuddyPress forums. So, first things first, welcome!

    Now, so as to help you more successfully navigate these forums, a few rules of the road. First, look at the sticky topics at the very top of the main forum page. There are a lot of useful, key pieces of advice that can be found there.

    Second, posting in a 2-month old forum that is marked resolved will most likely not get you very far. Why? Because many of us skip over forum threads marked as resolved, looking to spend our time on issues that are still bothering members. Please read this thread for more tricks of the trade

    Third, be careful when looking to follow advice in threads that are more than a month old. BuddyPress is a new platform and as such is evolving rapidly. What worked a few months ago, may no longer apply as better, easier to implement solutions get added to the core functionality. Therefore, if you cannot find a relatively recent thread on a topic, it is best to start a new thread just to make sure things have not changed–or to learn the proper way of doing something if they have changed

    Finally, as to your question:

    Where is the core? It is mentioned everywhere in this forum and I can’t find it for the life of me.

    The core files are the primary BuddyPress files that are found in /wp-content/plugins/buddypress/. Whereas some of them start with “bp-core-”, in general, all of the files found in the /buddypress/ directory are considered core files.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘How can I remove Logout link from the userbar?’ is closed to new replies.