Skip to:
Content
Pages
Categories
Search
Top
Bottom

adding social images links to the page

  • Avatar of dromy
    dromy
    Participant

    @dromy

    after banging my head to the wall done this and it works great:

    <?php if ( !empty($bp_member_profile_data[ 'field=gplus' ]) ): ?>
    
       <a href="<?php bp_member_profile_data( 'field=gplus' ); ?>" title="My google plus">
         <img src="/images/gplus.png" alt="gplus" />
        </a>
            
     <?php endif; ?>

    enjoy.

    wish the community here were more helpful.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Avatar of dromy
    dromy
    Participant

    @dromy

    Sorry friends but it is not seems to work fine.
    the condition I insert gives always an empty case.

    if someone will be kind to check the code and give me an advice I will be very thankfull, (although this is not the best way to do so.)

    dromy

    Avatar of dromy
    dromy
    Participant

    @dromy

    I also tried:

          <?php 
            $social_usr_URL = bp_member_profile_data( 'field=gplus' );
            
            if ( !empty($social_usr_URL ) { 
           
            echo  "<a href='" + $bp_member_profile_data( 'field=gplus' ) + "' title='My google plus'><img src='/wp-content/themes/formation-child/images/gplus.png' alt='gplus' /></a>";
            }
            
           <?php endif; ?>

    still nothing..

    Avatar of dromy
    dromy
    Participant

    @dromy

    also tried:

    <?php $social_usr_URL = bp_member_profile_data( 'field=gplus' );
            
    if ( !empty( $social_usr_URL ) { ?>
           
    <a href="<?php bp_member_profile_data( 'field=gplus' ); ?>" title="My gplus"><img src="/images/gplus.png" alt="gplus" /></a>
            
    <?php } endif; ?>

    not working.

    Avatar of dromy
    dromy
    Participant

    @dromy

    I have typed this and now it works without the image, can someone tell me why there is no image:

    <?php $Usr_Url = bp_member_profile_data('field=facebook' );
         if ( !empty( $Usr_Url )) { ?>
    
            <a href="<?php $Usr_Url; ?>" title="My facebook">
            <img src="/wp-content/themes/formation-child/images/facebook.png" alt="facebook" /></a>
          
           <?php } ?>

    output is only the text in the field. missing the image. why?

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

The topic ‘adding social images links to the page’ is closed to new replies.