Ready to get started?Download WordPress


Buddypress Xprofile Custom Fields Type
[resolved] All text fields search for users with that text (4 posts)

  1. polle001
    Posted 1 year ago #

    All the fields are converted to a link that searches for that text.


    I add a field that says location:
    The user enters: Boston
    The result is that when you visit that profile you see

    Location: Boston

    Boston is a link and is linking to this:http://site.com/blog/users/?s=Boston

    That is not correct, its a problem in all the fields that are simply text.

    I need that some fields are just text with no links at all, something I think its the normal usage.

    How can I remove the automatic link to search in some of the fields ?



  2. adam1234567
    Posted 1 year ago #

    Hi - Is there a solution to this problem? I would also like to remove the hyperlinks associated with each profile field that is displayed.

    I tried putting the following in my wp-content/plugins/bp-custom.php:

    function remove_xprofile_links() {
    remove_filter( 'bp_get_the_profile_field_value', 'xprofile_filter_link_profile_data', 9, 2 );
    add_action( 'bp_init', 'remove_xprofile_links' );

    This seems to be the standard solution on the internet. However, this only works when your plugin is deactivated. Is there a work-around?


  3. donmik
    Plugin Author

    Posted 1 year ago #

    With my plugin activated you need to use this code:

    function remove_xprofile_links() {
        remove_filter( 'bp_get_the_profile_field_value', 'xprofile_filter_link_profile_data', 9, 2 );
    add_action('bp_setup_globals', 'remove_xprofile_links');

    add action to bp_setup_globals.

  4. adam1234567
    Posted 1 year ago #

    that works perfectly. thank you for your quick support and excellent plugin.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic


No tags yet.