New
PeoplePress is here. Community building for WordPress, reimagined. Fast, modern, and built for the communities you've always wanted to run.
See it live

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: 25509
    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

  • Participant
    Level: Initiated
    Posts: 3
    Arisu on #55116

    Hi! I don’t have this code working on bbPress 2.6.11 and BuddyPress 14.3.3.

You must be logged in to reply to this topic.

This topic is: not resolved