Skip to:
Content
Pages
Categories
Search
Top
Bottom

BuddyPress email problem


  • karabre1980
    Participant

    @karabre1980

    Hello, when I go to the Profile View where there are info like name, position etc. In the email info when I push on the email address it transfers me to the page (e.g @gmail.com it transfers me to gmail.com , when @yahoo.com it transfers me to yahoo.com), it works like url (I dont want that). I want when I am clicking the email address to open my email automatically so I can send an email and if this is not possible,then better not to be clickable so it wont transfer me somewhere. Waiting for your help. Thank you.

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

  • shanebp
    Moderator

    @shanebp

    You can prevent auto-links in the profile areas.

    You need to create a file called bp-custom.php and then add this function to it:

    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' );

    karabre1980
    Participant

    @karabre1980

    Where must I create this file??? In which place in WP???


    shanebp
    Moderator

    @shanebp

    Please follow the link I provided above. It explains everything you need to know.


    karabre1980
    Participant

    @karabre1980

    Hello, I have created the bp-custom.php inside the wp-content/plugins and put inside the code

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

    ?>

    but still the email works like a url link. Did I do something wrong…


    Boone Gorges
    Keymaster

    @boonebgorges

    You may be able to disable the linking in the admin. Go to Dashboard > Users > Profile Fields. Find the Email field, and click Edit. On the right-hand column, find the “Autolink” metabox. Switch it to ‘Disabled’ and save.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Skip to toolbar