我试图根据字段是否具有'copyclearance'的值来过滤内容。它是过滤,而不是显示与"copyclearance"值的内容,它是隐藏它,并显示其他。我如何替换它,使它只显示值为'copyclearance'的内容?
<?php while(has_sub_field('team_profile')):
$category = get_sub_field('category');
if($category!='copyclearance'){ ?>
<li class="col-lg-3 teamProfile">
<img src="<?php the_sub_field('user_image'); ?>" class="img-responsive"/>
<h2><?php the_sub_field('profile_name'); ?></h2>
<p class="jobTitle"><?php the_sub_field('category'); ?></p>
<p><?php the_sub_field('bio'); ?></p>
</li>
<?php }
endwhile; ?>
修改
if($category!='copyclearance')
if($category=='copyclearance')