Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

In the wordpress menu I would like to add a link to the buddypress user profile and messages. These links are dynamic based on the username like, http://buddypress.org/community/members/username/messages/, for example.

I know you can get the username with php but that is not allowed within wordpress menus (wp-admin/nav-menus.php) from what I can tell. I also need to add them at a specific place in the menu, not just at the end. What would be the simplest way to add these dynamic links to the wordpress menu?

Example:
Main Menu -> Human Resources -> Employee Resources -> Messages
Messages needs to link to the buddypress user's messages

share|improve this question
add comment

3 Answers

I believe this question is the same as what you are asking; see if the answer to that question helps you.

If that doesn't help, you may want to see if the BuddyPress Links WordPress plug-in provides the additional functionality that you require.

If neither of those solutions prove helpful enough, please provide a link to your site and point out which menu you are trying to add BuddyPress links to and we can give you more specific information.

share|improve this answer
    
Thank you for the reply however the question you linked is for adding links to the buddypress menu where as I want to add buddypress links to the wordpress menu. Also BuddyPress Links seems to be more off a Digg style plugin where users can share links. Unfortunately I can not provide a link to my site as it is an intranet and is locked down. –  Jackie Keiser Nov 30 '11 at 17:53
add comment

The desire is to have "My Profile" "My Messages" as Wordpress Menu items. I'm not sure it can be done, because I've never seen a dynamic menu item before, and Salutation people kind of thought of everything...

HOWEVER, it just occurred to me that you could put a static link to a static page in the menu, but have those pages Dynamically Redirect based on bp_get_user_id() or whatever it is:

http://shibashake.com/wordpress-theme/wordpress-page-redirect

Sorry this isn't a full answer but I'm just being creative here.

So, make a menu item "My Profile" link = "example.com/redirects/my-profile" which then uses onwe of her methods to redirect them to example.com/members/%USERID% or something like that.

share|improve this answer
add comment

This will give you the user-specific profile URL:

<? echo bp_loggedin_user_domain(); ?>

If you'd the link to go to the user's Messages page, just add to the end like so:

<? echo bp_loggedin_user_domain().'messages/'; ?>
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.