BuddyBoss Home – Web Support Forums Themes BuddyBoss theme issue with profile link in floating menu

Tagged: 

Viewing 13 posts - 1 through 13 (of 13 total)
  • Question

    #32165
    @haime

    Hi,

    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

    #32166
    @haime

    I meant on BB it points to /profile/activity …

    #32176

    Alyssa
    Participant
    @alyssa-buddyboss

    @haime a plugin could be causing this, or custom coding. Try disabling your plugins and see if it reverts back.

    #32191
    @haime

    I 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 🙂

    #32197

    Alyssa
    Participant
    @alyssa-buddyboss

    @haime can you send me a screenshot to make sure we are talking about the same link? Thanks!

    #32200
    @haime

    @admin see attached a screenshot from my site. The link I am talking about is circled in red

    #32202
    @haime

    BTW. maybe because I do not have Wall Plugin?

    #32203
    @joshuamrosenau

    I am having this exact same issue.

    The link in the dropdown takes me to /wp-admin/profile.php, instead of to /members/username.

    #32223

    Alyssa
    Participant
    @alyssa-buddyboss

    @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 )
    #32233
    @haime

    Ok, so I would need Wall plugin for this to work 🙂

    PS I tried this code in bp-custom but that does not work.

    #32253

    Alyssa
    Participant
    @alyssa-buddyboss

    @haime I updated some errors in the code above, try now. No guarantees.

    #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!

    #32300

    Alyssa
    Participant
    @alyssa-buddyboss

    Sorry, I didn’t proof before posting. Thanks for the fix 🙂

Viewing 13 posts - 1 through 13 (of 13 total)
  • The question ‘issue with profile link in floating menu’ is closed to new replies.