Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] How to stop xprofle fields from linking

  • @charlietech

    Participant

    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)
  • @bphelp

    Participant

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

    @charlietech

    Participant

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

    @charlietech

    Participant

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

    @bphelp

    Participant

    @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?

    @bphelp

    Participant

    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.

    @bphelp

    Participant

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

    @charlietech

    Participant

    this is what i added

    @charlietech

    Participant

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

    @bphelp

    Participant

    @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.

    @charlietech

    Participant

    I got before the last reply, thanks so much!

    @bphelp

    Participant

    @charlietech Glad I could assist you! 🙂

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘[Resolved] How to stop xprofle fields from linking’ is closed to new replies.
Skip to toolbar