Skip to:
Content
Pages
Categories
Search
Top
Bottom

Remove profile links

  • Avatar of jdhall1972
    jdhall1972
    Participant

    @jdhall1972

    WordPress 3.5.1
    BuddyPress 1.7

    BuddyPress is automatically turning custom field results into links on my profile pages. I’ve tried turning off this feature with the code below, but it doesn’t work. Any suggestions?

    `
    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,
    John

    http://missionsfund.org/missions/john-hall/profile/

Viewing 15 replies - 1 through 15 (of 15 total)
  • Avatar of AllenPayne
    AllenPayne
    Participant

    @allenpayne

    I’d like to know this as well. can anyone help?

    Avatar of AllenPayne
    AllenPayne
    Participant

    @allenpayne

    I’ve tried with this code but it doesn’t work either:

    remove_filter( ‘bp_get_the_profile_field_value’, ‘xprofile_filter_link_profile_data’, 50 );

    Avatar of @mercime
    @mercime
    Keymaster

    @mercime

    @jdhall1972
    you’ve got to put that code into  bp-custom.php which you need to upload to wp-content/plugins/ folder in server as posted here http://codex.buddypress.org/developer/customizing/bp-custom-php/
    cc @allenpayne

    Avatar of AllenPayne
    AllenPayne
    Participant

    @allenpayne

    I did that already. Still doesn’t work. I tried to place it in both the functions.php file and the bp-custom.php (located at wp-content/plugins) with no success.

    Any other ideas @mercime?

    Avatar of praisehim
    praisehim
    Participant

    @praisehim

    True. I am having the same problem with BuddyPress 1.7 and WordPress 3.5.1. This is definately a bug.

    Avatar of bp-help
    bp-help
    Participant

    @bphelp

    @praisehim
    It is not a bug at all. I use this code with BP 1.7 and WP 3.5.1 with various themes downloaded from wordpress.org and it works flawlessly. Either you have a theme, plugin, or custom code that is conflicting with the code. Please make sure you test it thoroughly as I have before stating it is a bug.

    Avatar of praisehim
    praisehim
    Participant

    @praisehim

    @bp-help

    Thank you for the response. Would you be able to advise as to where I should begin to see where the conflict is coming from please?

    Thank you once again.

    Avatar of bp-help
    bp-help
    Participant

    @bphelp

    @praisehim
    The answer is in my previous response. Most likely its a theme, plugin, or custom code you may have introduced. You may need to revert back to a twenty twelve theme or bp-default theme, and deactivate all plugins other than buddypress. If you created a file in wp-content/plugins named bp-custom.php you also need to make sure the code is between opening and closing php tags like so:

    
    <?php
    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 praisehim
    praisehim
    Participant

    @praisehim

    @bphelp

    It’s funny, but the plugin used to creat the custom fields Buddypress Xprofile Custom Fields Type 1.5.5.5 is what is causing the links to appear. I’m very confused as to what to do. I disabled all plugins and the current theme, and the links didn’t appear, however, as soon as I re-enabled the Buddypress Xprofile Custom Fields Type 1.5.5.5, then the links appear.

    What should I do now please :(

    Avatar of bp-help
    bp-help
    Participant

    @bphelp

    @praisehim
    I suggest you ask the plugins author on their support forum why it conflicts with this function. Request that they add a class to the plugin. A lot of times that helps with conflicting functions. If that doesn’t work then simply don’t use the plugin. For now that is the best advise I can give you.

    Avatar of bp-help
    bp-help
    Participant

    @bphelp

    I forgot to add this link which explains adding a class which wraps the function of the plugin:

    http://codex.wordpress.org/Plugin_API

    Note the part about avoiding function name collisions.

    Avatar of praisehim
    praisehim
    Participant

    @praisehim

    @bphelp

    I ended up not using the plugin, however, I did make a post in their support forum asking them to resolve it. It seemed like the default profile fields sufficed for me anyway.

    Thank you for your help!

    Avatar of bp-help
    bp-help
    Participant

    @bphelp

    @praisehim
    Your very much welcome! Glad I could assist you.

    Avatar of bp-help
    bp-help
    Participant

    @bphelp

    @praisehim
    For the sake of convenience I made a super light weight plugin wrapped in a class that may enable you to use the Buddypress Xprofile Custom Fields Type plugin along with the plugin I made to get rid of the profile links. Give it a try and give some feedback if this resolves the conflict! Get the plugin here:

    https://github.com/bphelp/bp-remove-profile-links

    Avatar of Matthew_Radich
    Matt Rad
    Participant

    @matthew_radich

    @bp-help Thanks for the plugin. I have tried it out. I did have trouble with it conflicting with BP Docs (I believe). I have since uninstalled that plugin and now yours works fine.

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

You must be logged in to reply to this topic.