If special xprofile field with id=10 has data then output following:
<tr<?php bp_field_css_class(); ?>>
<td class="label"><?php bp_the_profile_field_name(); ?></td>
<td class="data"><details><?php bp_the_profile_field_value(); ?></details></td>
</tr>
for all other xprofile fields with data the output should be:
<tr<?php bp_field_css_class(); ?>>
<td class="label"><?php bp_the_profile_field_name(); ?></td>
<td class="data"><?php bp_the_profile_field_value(); ?></td>
</tr>
How should I change the second while
loop in the buddypress profile-loop.php?
<div class="bp-widget <?php bp_the_profile_group_slug(); ?>">
<h2><?php bp_the_profile_group_name(); ?></h2>
<table class="profile-fields">
<?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?>
<?php if ( bp_field_has_data() ) : ?>
<tr<?php bp_field_css_class(); ?>>
<td class="label"><?php bp_the_profile_field_name(); ?></td>
<td class="data"><?php bp_the_profile_field_value(); ?></td>
</tr>
<?php endif; ?>
<?php
do_action( 'bp_profile_field_item' ); ?>
<?php endwhile; ?>
</table>
</div>