Home › Forums › General Issues › Relationship – Add categories / taxonomies to list › Reply To: Relationship – Add categories / taxonomies to list
Hi guys i have a similar problem. I have a CPT with a relationship to pages. But the CPT has also various taxanomies. So I need the Output loop to list the relationship items to the taxonomies.
$posts = get_posts(array( 'posts_per_page' => -1, 'post_type' => 'materialien', 'order' => 'ASC', 'category' => 'medienform', 'include' => '', 'exclude' => '', 'key' => 'post-relationship', 'orderby' => 'post_date', 'meta_query' => array( array( 'key' => 'post-relationship', // name of custom field 'value' => '"' . get_the_ID() . '"', // matches exactly "123", not just 123. This prevents a match for "1234" 'compare' => 'LIKE' ) ),
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!
© 2022 Advanced Custom Fields.