Если в специальном поле xprofile с id = 10 есть данные, выведите следующее:
<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>
для всех других полей xprofile с данными вывод должен быть:
<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>
Как мне изменить второй while
цикл в 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>