BuddyBoss Home – Web › Support Forums › Themes › BuddyBoss theme › issue with profile link in floating menu
Tagged: profile link
- This topic has 12 replies, 3 contibutors, and was last updated 10 years, 1 months ago by Alyssa.
Question
October 2, 2014 at 2:58 am #32165@haimeHi,
I noticed on my site that the profile link (My Name) is pointing to /profile/edit instead of to /profile
On buddyboss site the link is correct (pointing to /profile)
Is this a BP issue or is it in the floating menu of BB? I am using 4.0.6 with BP 2.1
regards,
Answers
October 2, 2014 at 2:59 am #32166@haimeI meant on BB it points to /profile/activity …
October 2, 2014 at 8:20 pm #32176@alyssa-buddyboss
AlyssaParticipant@haime a plugin could be causing this, or custom coding. Try disabling your plugins and see if it reverts back.
October 3, 2014 at 4:47 am #32191@haimeI disabled all plugins except for BP (2.1) and I still have this issue. I do not see where I can correct this.
On BuddyBoss profile here I see it is set to /members/haime/activity
On my site it is set to /members/haime/profile/edit
🙁
Probably a BP issue, but seeing that on buddyboss.com it is as I would like to have it also any help would be really appreciated 🙂
October 3, 2014 at 10:47 am #32197@alyssa-buddyboss
AlyssaParticipant@haime can you send me a screenshot to make sure we are talking about the same link? Thanks!
October 3, 2014 at 12:58 pm #32200@haime@admin see attached a screenshot from my site. The link I am talking about is circled in red
October 3, 2014 at 1:00 pm #32202@haimeBTW. maybe because I do not have Wall Plugin?
October 3, 2014 at 1:06 pm #32203@joshuamrosenauI am having this exact same issue.
The link in the dropdown takes me to /wp-admin/profile.php, instead of to /members/username.
October 4, 2014 at 4:06 pm #32223@alyssa-buddyboss
AlyssaParticipant@haime @joshuamrosenau you are correct this is a function of the BuddyBoss Wall Plugin. It is on line 412:
function update_wp_menus() { global $wp_admin_bar, $bp; $domain = $bp->loggedin_user->domain; $profile_link = $domain . $bp->activity->slug . '/'; $activity_link = trailingslashit( $domain . $bp->activity->slug ); // Change menus item to link to wall $user_info = $wp_admin_bar->get_node( 'user-info' ); if ( ! is_object( $user_info ) ) $user_info = new stdClass(); $user_info->href = trailingslashit( $activity_link ); $wp_admin_bar->add_node( $user_info ); $my_acct = $wp_admin_bar->get_node( 'my-account' ); if ( ! is_object( $my_acct ) ) $my_acct = new stdClass(); $my_acct->href = trailingslashit( $activity_link ); $wp_admin_bar->add_node( $my_acct ); } } add_action( 'wp_before_admin_bar_render', 'update_wp_menus', 99 )
October 5, 2014 at 1:59 am #32233@haimeOk, so I would need Wall plugin for this to work 🙂
PS I tried this code in bp-custom but that does not work.
October 5, 2014 at 3:02 pm #32253@alyssa-buddyboss
AlyssaParticipant@haime I updated some errors in the code above, try now. No guarantees.
October 6, 2014 at 3:52 am #32281@haime@admin I got it working now in bp-custom.php ! 🙂 Had to make two small changes to your code (remove last } and add ; after the add_action line)
function update_wp_menus() { global $wp_admin_bar, $bp; $domain = $bp->loggedin_user->domain; $profile_link = $domain . $bp->activity->slug . '/'; $activity_link = trailingslashit( $domain . $bp->activity->slug ); // Change menus item to link to wall $user_info = $wp_admin_bar->get_node( 'user-info' ); if ( ! is_object( $user_info ) ) $user_info = new stdClass(); $user_info->href = trailingslashit( $activity_link ); $wp_admin_bar->add_node( $user_info ); $my_acct = $wp_admin_bar->get_node( 'my-account' ); if ( ! is_object( $my_acct ) ) $my_acct = new stdClass(); $my_acct->href = trailingslashit( $activity_link ); $wp_admin_bar->add_node( $my_acct ); } add_action( 'wp_before_admin_bar_render', 'update_wp_menus', 99 );
Thanks a lot!
October 6, 2014 at 8:08 pm #32300@alyssa-buddyboss
AlyssaParticipantSorry, I didn’t proof before posting. Thanks for the fix 🙂
- The question ‘issue with profile link in floating menu’ is closed to new replies.