Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] How to stop xprofle fields from linking

  • Avatar of charlietech
    charlietech
    Participant

    @charlietech

    Hey there,

    Every time i create a new profile field, it turns into a link. How do i stop that? where do i go?

Viewing 11 replies - 1 through 11 (of 11 total)
  • Avatar of bp-help
    bp-help
    Participant

    @bphelp

    Add this to your themes functions.php or bp-custom.php:
    `
    /*
    * Remove autolinks created in buddypress profiles
    */
    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’ );
    `

    Avatar of charlietech
    charlietech
    Participant

    @charlietech

    WHere you been all my life LOL thanks for the prompt replay and code. child or parent?

    Avatar of charlietech
    charlietech
    Participant

    @charlietech

    Too good to be true, it didn’t work. I put it in my child theme function. php

    Avatar of bp-help
    bp-help
    Participant

    @bphelp

    @charlietech
    If your using a child theme then add a functions.php to it and add the code to it between opening and closing php tags. Never edit a theme direct because you will loose all changes if you update it. Always use a child theme to preserve custom edits okay?

    Avatar of bp-help
    bp-help
    Participant

    @bphelp

    functions.php wont work if you didn’t add the opening and closing php tags that surrounds this code. It works for me so I am assuming your leaving out the php tags.

    Avatar of bp-help
    bp-help
    Participant

    @bphelp

    JFYI it also needs to be named functions.php not function.php

    Avatar of charlietech
    charlietech
    Participant

    @charlietech

    this is what i added

    Avatar of charlietech
    charlietech
    Participant

    @charlietech

    I made a functions.php page, thank you so much.

    Avatar of bp-help
    bp-help
    Participant

    @bphelp

    @charlietech
    For the sake of simplicity I added this code for you:

    http://pastebin.com/DWhb11MZ

    In the functions.php paste that code and it will sort you out.

    Avatar of charlietech
    charlietech
    Participant

    @charlietech

    I got before the last reply, thanks so much!

    Avatar of bp-help
    bp-help
    Participant

    @bphelp

    @charlietech Glad I could assist you! :-)

Viewing 11 replies - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.