Buddypress Xprofile Custom Fields: remove links

  • Participant
    Level: Initiated
    Posts: 3
    Fabrice BLIN on #24860

    I am using BuddyPress Xprofile Custom Field Types plugin.
    I want to create a users listing with custom fields.
    I use bp_get_profile_field_data function that is working fine.
    But I get a return value with a link.
    Example: <a href="http://localhost/execboardinasia/job-function/it/">IT</a>
    I would like only : IT
    Is it possible to filter the return value of this function and remove the link ?
    Thanks for your help

  • Keymaster
    (BuddyDev Team)
    Posts: 22566
    Brajesh Singh on #24861

    Hi Fabrice,
    Thank you for the question.

    It is not caused by the Bp Xprofile Custom Field Types plugin. It is how BuddyPress works. There are 2 solutions.

    1. You can disable Autolinking from Dashboard->Users->Profile Fields and editing that specific field.

    2. Or you can use

    maybe_unserialize( BP_XProfile_ProfileData::get_value_byid( $field_id, $user_id ) );

    It returns non filtered data.

    Hope that helps.


You must be logged in to reply to this topic.

This topic is: not resolved