This topic has 11 replies, 6 voices, and was last updated 8 years by Abe.

  • Author
  • #3030
     LKr
    Participant

    Hi!
    Thank you for the great support. Quick question:

    When I look at my profile (as a user), in the “View” mode, certain fields (e.g. Name) and parts of other fields are clickable. If I click on any of those, I get redirected to the Members search page where it shows other members (presumably with similar characteristics).
    Is it possible to make all information in User profile UN -CLICKABLE so that it is just as simple text. ?
    I do have matching disabled.

    #3042
     SQadmin
    Keymaster

    Hi,
    Yes it can be done.
    Add this code to wp-content/plugins/bp-custom.php to make Buddypress not generate the links:

    COPY CODE
    
    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' );
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #3061
     LKr
    Participant

    Awesome – worked. Thanks!

    #3067
     Cenk
    Participant

    Hi,

    Can you help me to remove the profile links?

    Example:

    Name: Something (linked)
    Gender: Something (linked)

    I’m using Buddypress Xprofile Custom Fields Type plugin

    Thanks,

    Cenk

    #3070
     adam
    Participant

    I tried making this change as well and it’s not working for me. It doesn’t seem like any changes I make to wp-content/plugins/bp-custom.php work. Do you know why this might be? Here is what my file looks like:

    <?php

    if ( !defined( ‘BP_AVATAR_THUMB_WIDTH’ ) )
    define( ‘BP_AVATAR_THUMB_WIDTH’, 120 ); //change this with your desired thumb width

    if ( !defined( ‘BP_AVATAR_THUMB_HEIGHT’ ) )
    define( ‘BP_AVATAR_THUMB_HEIGHT’, 120 ); //change this with your desired thumb height

    if ( !defined( ‘BP_AVATAR_FULL_WIDTH’ ) )
    define( ‘BP_AVATAR_FULL_WIDTH’, 580 ); //change this with your desired full size,weel I changed it to 260 :)

    if ( !defined( ‘BP_AVATAR_FULL_HEIGHT’ ) )
    define( ‘BP_AVATAR_FULL_HEIGHT’, 580 ); //change this to default height for full avatar

    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’ );

    ?>

    Thanks.

    #3074
     adam
    Participant

    I realize now it’s a conflict with my plugin: Buddypress Xprofile Custom Fields Type. It works when I deactivate it. Any chance you know a work-around? If not, I’ll try contacting the plug-in author. Thanks!

    #3085
     adam
    Participant

    The Buddypress Xprofile Custom Fields Type plugin author sent me a fix that works. I had to include this in my wp-content/plugins/bp-custom.php file instead (in case anyone is using the same plugin and having this issue):

    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’);

    #3087
     SQadmin
    Keymaster

    Thanks for sharing. Glad it works.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #3116
     Cenk
    Participant

    Hi,

    I tried the code. The profile fields are still linked. It works when I deactivate the Buddypress Xprofile Custom Fields plugin.

    I did this.

    <?php

    if ( !defined( ‘BP_AVATAR_THUMB_WIDTH’ ) )
    define( ‘BP_AVATAR_THUMB_WIDTH’, 120 ); //change this with your desired thumb width

    if ( !defined( ‘BP_AVATAR_THUMB_HEIGHT’ ) )
    define( ‘BP_AVATAR_THUMB_HEIGHT’, 120 ); //change this with your desired thumb height

    if ( !defined( ‘BP_AVATAR_FULL_WIDTH’ ) )
    define( ‘BP_AVATAR_FULL_WIDTH’, 580 ); //change this with your desired full size,weel I changed it to 260 :)

    if ( !defined( ‘BP_AVATAR_FULL_HEIGHT’ ) )
    define( ‘BP_AVATAR_FULL_HEIGHT’, 580 ); //change this to default height for full avatar

    define( ‘BP_DEFAULT_COMPONENT’, ‘profile’ );

    define( ‘BP_GROUPS_DEFAULT_EXTENSION’, ‘members’ );

    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’ );

    ?>

    Thanks again.

    #3117
     adam
    Participant

    Hi Cenk – I had posted the solution to this above.

    #116214
     LuukDriessen
    Participant

    Hello,

    I’m still having problems with this option/solution.

    I don’t make use of the Xprofile plugin.
    Instead, I use: Custom Profile Filters for BuddyPress

    My bp-custom.php:

    COPY CODE
    <?php /* remove profile field links */
    function remove_xprofile_links() {
    remove_filter( ‘bp_get_the_profile_field_value’, ‘xprofile_filter_link_profile_data’, 1, 469 );
    }
    add_action(‘bp_setup_globals’, ‘remove_xprofile_links’);?>

    Does anyone has any idea what to change?

    1. I would like to DISABLE to search/link for username. ID:1
    2. I would like to ENABLE the search/link for age. ID:2

    #116953
     Abe
    Keymaster

    Very old topic.

    Please try to do a search on BuddyPress forums since this is old and probably does not apply.

    Cheers

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

Viewing 12 posts - 1 through 12 (of 12 total)

The forum ‘Sweetdate – WordPress’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?