I’ve got it working great to show icons if certain profile fields have data. But, I need to show some text above the icons only if they exist.
My Profile group is “Search Property”. Here’s what I have, but with this nothing is showing…
<?php if (bp_get_profile_field_data(array('field=Property Search', 'field=Search Foreclosures', 'field=See My Listings')) === "") : ?>
<?php else:?>
<p></p>
<h5>Property Search</h5>
<ul>
<?php if (bp_get_profile_field_data('field=Property Search') === "") : ?>
<?php else:?>
<li><a rel="me" href="<?php echo bp_get_profile_field_data( 'field=Property Search' ) ?>" target="_blank" title="Property Search"><img class="avatar" src="http://housingstorm.com/files/2011/08/mag.png" style="width:32px; height:32px;"></a> </li>
<?php endif;?>
<?php if (bp_get_profile_field_data('field=Search Foreclosures') === "") : ?>
<?php else:?>
<li><a rel="me" href="<?php echo bp_get_profile_field_data( 'field=Search Foreclosures' ) ?>" target="_blank" title="Search Foreclosures"><img class="avatar" src="http://housingstorm.com/files/2011/08/reo.png" style="width:32px; height:32px;"></a> </li>
<?php endif;?>
<?php if (bp_get_profile_field_data('field=See My Listings') === "") : ?>
<?php else:?>
<li><a rel="me" href="<?php echo bp_get_profile_field_data( 'field=See My Listings' ) ?>" target="_blank" title="My Listings"><img class="avatar" src="http://housingstorm.com/files/2011/08/sale.png" style="width:32px; height:32px;"></a> </li>
<?php endif;?>
</ul>
<?php endif;?>
I think my array is set up wrong. If any of those fields have data, then I want to show the heading. But if none of them do, I don’t.
What am I doing wrong? Thanks!