Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] How to stop xprofle fields from linking


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

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


    charlietech
    Participant

    @charlietech

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


    charlietech
    Participant

    @charlietech

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


    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?


    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.


    bp-help
    Participant

    @bphelp

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


    charlietech
    Participant

    @charlietech

    this is what i added


    charlietech
    Participant

    @charlietech

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


    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.


    charlietech
    Participant

    @charlietech

    I got before the last reply, thanks so much!


    bp-help
    Participant

    @bphelp

    @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