Adding a Profile Button to Navigation

I have set that when a member signs in, that it automatically redirects them to their profile page, I am just wondering if there is away to insert/add a profile button to the navigation. The reason for this is simply if a user leaves their profile page and goes to another web they only way the can go back to the profile is using the back button on the browser or going to the members page and selecting their name.

hi
sorry for delayed reply.
You can put it in your theme or just create bp-custom.php in your wp-content/plugins and put the above code.
I am posting it on pastebin for you(the forum post ate my code ).http://bpdev.pastebin.com/FSm7VQ2L

It will work if you are using the buddypress default theme or a theme which supports buddypress standard theme action.
Please let us know if you are using bp-default or not.

Hi Brajesh! The code you first posted does the job with the BP default theme, and puts the link in the right place. What it doesn’t do is pick up the styling of the rest of the nav bar buttons – it just creates a link. How do I get it to do that? (Apologies for my lack of technical ability, but I’m learning as I go….)

@gtn
Hi, Please take a look at the second code, It will allow you linking while retaining the buddypress style. I had forgot to put the li elements, so, corrected in the 2nd link.
Hope that helps.
Thanks
Brajesh

Thanks for this piece of code, Ive been looking for something like this for awhile now. One problem however (nothing to do with your code tho).

When a user logs into my BuddyPress website it automatically redirects them to their profile page, therefore making the MEMBERS and MY PROFILE link both active, (In my case they are both now turning orange). Is it possible to make only the MY PROFILE link active?

@richard1987@sofastop you are most welcome:)
For no highlighting the members tab and just highlighting the “My profile” tab, we will need to modify the header.php.
Please create a child theme and copy the header from bp-default to your child theme.
Then edit it and change line no 57 where the code says

Apologies, but I’m now lost as to what I should be putting in a bp-custom.php file to work with the default BuddyPress theme to provide a link with a matching navigation button. I’ve tried various elements of cutting and pasting from what you’ve posted, and always end up with errors. (This is probably because I don’t really know enough – plugins were made for the likes of me!)

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

The topic ‘Adding a Profile Button to Navigation’ is closed to new replies.