WordPress.org

Forums

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

  1. polle001
    Member
    Posted 2 years ago #

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

    Example:

    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 ?

    Thanks.

    http://wordpress.org/plugins/buddypress-xprofile-custom-fields-type/

  2. adam1234567
    Member
    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?

    Thanks!

  3. donmik
    Member
    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
    Member
    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

  • Buddypress Xprofile Custom Fields Type
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.