如何在WordPress中正确过滤掉具有唯一类别的自定义帖子类型?

How do you properly filter out a custom post type with unique categories in WordPress?

when i am doing show the result: Repeat value 1.HEALTH 2.Education 3.HEALTH

<?php
 global $post;
 $myposts = get_posts(array(
'post_type' => 'product',
'numberposts' => '999',
'orderby' => 'menu_order',
'order' => 'ASC'
 ));

?>
<ul>

<?php foreach($myposts as $post){ ?>                    
<li>
<a href="#">
<?php the_field("product_category")?>
</a>
</li>
<?php } ?>
</ul>

Try this,

<?php
$myposts = get_posts(array(
'post_type' => 'product',
'numberposts' => '-1',
'orderby' => 'title',
'order' => 'ASC'
 ));

?>
<ul>
<?php foreach($myposts as $post){ ?>                    
<li>
<a href="<?php echo get_permalink($post->ID); ?>">
<?php echo get_the_title($post->ID);?>
</a>
</li>
<?php } ?>
</ul>

Notes: 'posts_per_page' => -1, Add this to the WP_QUERY array of arguments and it should return all of the posts of this custom post type.

</div>