• I tried consulting in other forums and in this one but no one knows how to resolve this:

    when adding an “if(!empty($data))” php statement the html is ignored. for example:

    <a href="http://<?php bp_member_profile_data('field=facebook'); ?>" title="My facebook">
      <img src="images/facebook.png" alt="facebook" />
     </a>

    in any form of syntax I used when adding if before it the outcome is only the field data without all the html.

    for example: adding if like that:

    <?php
     $Usr_Url = bp_member_profile_data('field=facebook');
    if ( $Usr_Url != "" ) { ?>
    
      <a href="http://<?php bp_member_profile_data('field=facebook'); ?>" title="My facebook">
     <img src="images/facebook.png" alt="facebook" />
    </a>
    
     <?php } ?>

    Displayed only the fields data and ignore all html but if like on first case liek I wrote the all html is displayed.

Viewing 4 replies - 1 through 4 (of 4 total)
  • to what theme or plugin does this function belong:

    bp_member_profile_data()

    in what template are you using your code?

    does this function return or echo the result?

    Thread Starter dromy

    (@dromy)

    I used the formation theme with buddypress plugin and I inserted all this in the buddypress folder I created on the theme folder.

    it supposed to echo but the also with the echo function the result is the same.

    the function bp_member_profile_data(‘field=filedname’) belongs to budyypress.

    possibly ask in http://buddypress.org/support/

    and/or ask directly in your theme’s forum at http://wordpress.org/support/theme/formation

    inserted all this in the buddypress folder I created on the theme folder.

    in what file?

    Thread Starter dromy

    (@dromy)

    Thanks.
    I’ll try formation, buddypress won’t respond or help me.

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

The topic ‘adding if statment kills\ignores the html’ is closed to new replies.