Skip to:
Content
Pages
Categories
Search
Top
Bottom

User website links in profile


  • Chuck141
    Participant

    @chuck141

    Hi,

    I am using this code to pull social links from xprofile fields into the users profile header:

    function bpfr_socialize_profile () {

    echo '<br>'; // don't remove !

    if ( $data = bp_get_profile_field_data( 'field=Twitter ' ) ) :
    ?>

    /" target="_blank" title="Twitter"><i class="icon-twitter"> </i>Test Twitter 

    <?php endif;

    I am looking to do the same but with custom urls. So for instance if they type in Buddypress.org, that text will appear in the header and link to the website. I am no coder and with a few tweaks of above code, I can get it to show the url, but only with the text that I choose myself displayed in </i>Test Twitter. I want the text which the user types in to appear. I have searched some tutorials and tried a few different options but nothing works, I wish I could code! 😀 Hopefully this is easy enough. Can anyone help?

    EDIT: If its easy enough, I would prefer the text to show in a form of a button, but text will do for now.

    Thanks in advance.

    Chuck.

Viewing 1 replies (of 1 total)

  • Chuck141
    Participant

    @chuck141

    Sorry, the code above is wrong.

    function bpfr_socialize_profile () {	
    
    echo '<br>'; // don't remove !
    
    if ( $data = bp_get_profile_field_data( 'field=Twitter ' ) ) : 
    ?>
    
    <a href="http://twitter.com/<?php echo xprofile_get_field_data( 'Twitter', bp_displayed_user_id() );?>/" target="_blank" title="Twitter"><i class="icon-twitter">  </i>Test Twitter</a>&nbsp;
    
    <?php endif;
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar