BuddyDev

Search

Make bbpress edit profile link go to bbpress, not BP

Tagged: , ,

  • Participant
    Level: Initiated
    Posts: 10
    demonboy on #26019

    Hi,

    I would like the user to be able to access and edit their bbpress profile page. This is because I use a plugin that places some editable options within the bbpress template. However if I include this link

    <a h ref="< ? php bbp_user_profile_url( bbp_get_current_user_id() ); ?>edit" >Amend Profile< / a>

    they are taken to their BP profile page. How do I force this link to go to the bbpress profile edit page?

    Thanks in advance.

  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #26030

    Please put this in your bp-custom.php

    
    add_action( 'bp_init', function (){
    
    	if( ! function_exists('bbpress')) {
    		return;
    	}
    	 remove_filter( 'bbp_pre_get_user_profile_url',    array( bbpress()->extend->buddypress->members, 'user_profile_url'            )        );
    });
    

    That will stop bbPress from filtering profile url.

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: not resolved