Home › Forums › Front-end Issues › ACF – Can't get custom post type by taxonomy, no idea how to fix › Reply To: ACF – Can't get custom post type by taxonomy, no idea how to fix
Still not working, felt like ive tried every variation.
The backend has modified slightly, but I am still using the ACF field.
Tried both variations nothing has worked.
$args = array(
‘post_type’ => ‘service_packages’,
// ‘meta_query’ => ‘service_category’,
// ‘meta_value’ => ‘5’
‘tax_query’ => array(
array(
‘taxonomy’ => ‘service_category’,
‘terms’ => ‘5’
),
)
);
5 is the id of the category.
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!
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 Privacy Policy. If you continue to use this site, you consent to our use of cookies.