@jdhall1972
That code should work providing you added it to bp-custom.php or your themes functions.php between opening and closing php tags.
You’re right. It SHOULD work. But it doesn’t, and that’s why I’m writing.
http://missionsfund.org/missions/jane-masterson/profile/
@jdhall1972
I just checked the link you provided and there is no auto links so the code is working. Maybe you need to do a hard refresh. CTRL+F5
I was having the same problem, and it wouldn’t work for me with any of the suggested hacks in bp-custom.php
I found a thread in the WordPress forum on the same topic which worked. Just put:
remove_filter( 'bp_get_the_profile_field_value', 'xprofile_filter_link_profile_data', 9);
in your theme functions.php
Hope that helps.
@jimmmy
I made a small plugin that should remove those links:
https://github.com/bphelp/bp-remove-profile-links
Feel free to try it out and let me know if it works for you!
use init not bp_init
function remove_xprofile_links() {
remove_filter( ‘bp_get_the_profile_field_value’, ‘xprofile_filter_link_profile_data’, 9, 2 );
}
add_action( ‘init’, ‘remove_xprofile_links’ );
@modemlooper
Has this changed since 1.5 because the codex:
https://codex.buddypress.org/developer/customizing/bp-custom-php/
Uses bp_init in the examples?
I’m not sure but it works for me when using init. I’m also calling the file the function is in by using bp_include
@modemlooper
Reason I asked is because bp_init and init both work fine with the plugin I made on my test environment. I did update the plugin I made to remove profile auto links on github with init for compatibility sake. BTW bp-include has been in the plugin since conception in the loader.php. If someone knows better then feel free to chime in. Maybe someone will find it a useful nugget. If anyone wants to use it, download the zip file from here, upload, and activate:
https://github.com/bphelp/bp-remove-profile-links
I think the reason I’m having funkiness is because the remove links code is inside a function that only runs if a wp option is true.
@modemlooper
That definitely would make a difference. Anyway thank you for your input!