Home › Forums › General Issues › Taxonomy Issue › Reply To: Taxonomy Issue
I’ve tried the below and also tried the ‘parent’ => 0.
If I do the below, nothing happens. If I do the ‘parent’ => 0 it removes the subcategory and only shows the parent… there must be something i’m doing wrong đ
<?php
$member_group_terms = get_terms( 'meps_category', array(
'child_of' => 0
) );
?>
<?php
foreach ( $member_group_terms as $member_group_term ) {
$member_group_query = new WP_Query( array(
'post_type' => 'mep',
'tax_query' => array(
array(
'taxonomy' => 'meps_category',
'field' => 'slug',
'terms' => array( $member_group_term->slug ),
'operator' => 'IN'
)
)
)
);?>
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
ACF wouldnât be so widely used in WordPress if it didnât have some pretty amazing capabilities. In this article, we look at a few of the features weâll discuss during â7 things you didnât know you could do with ACFâ at #WPEDecode later this month. https://t.co/5lnsTxp81j pic.twitter.com/Yf0ThPG1QG
— Advanced Custom Fields (@wp_acf) March 16, 2023
© 2023 Advanced Custom Fields.
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.