高级自定义字段删除重复值
问题描述:
我使用ACF创建将按职位名称筛选的团队成员部分。我有一切工作,因为我想,除非如果2人具有相同的工作标题,然后显示在过滤器中相同的工作职位2,但我只希望它显示1的任何职位。高级自定义字段删除重复值
下面是我的ACF领域:
<?php if(have_rows('team')): ?>
<div class="filters">
<div class="filter" data-filter="all">Show All</div>
<?php while(have_rows('team')): the_row(); ?>
<div class="filter" data-filter=".<?php echo get_sub_field('job_title'); ?>"><?php echo get_sub_field('job_title'); ?></div>
<?php endwhile; ?>
</div>
<div id="Container">
<?php while(have_rows('team')): the_row(); ?>
<div class="mix <?php echo get_sub_field('job_title'); ?>" data-myorder="2"><?php echo get_sub_field('name'); ?></div>
<?php endwhile; ?>
</div>
有没有办法删除了过滤重复值?
你的信息架构似乎是错误的。创建职位分类标准,将其链接到团队成员发布类型,然后根据分类标准创建过滤列表,而不是扫描打印内容。 – staypuftman