Home › Forums › ACF PRO › Post Object within taxonomy. › Reply To: Post Object within taxonomy.
I was able to solve it, thank you one more time.
I now have to check how the code does not influence the tags. When I link it it also changes the tags in the loop. I’ll check that out.
For those who have doubts about how to proceed, follow the code below:
<?php $posts = get_field('related_series', $taxonomy . '_' . $term_id); if( $posts ): ?> <ul> <?php foreach( $posts as $p ): // variable must NOT be called $post (IMPORTANT) ?> <li><?php $feat_image = wp_get_attachment_image_src( get_post_thumbnail_id( $p->ID ), 'featured', false, '' );?> <a href="<?php echo get_permalink( $p->ID ); ?>"><?php echo get_the_title( $p->ID ); ?><?php echo '<img src="'.$feat_image.'">';?></a> </li> <?php endforeach; ?> </ul> <?php endif; ?>
Then just code for your needs. I’ll try to do per repeater field.
I only need to solve three issues with acf to be able to finish my project =). Man, I’ll come soon, pay for some coffee or juice for you!
Beee helping ever !!
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’re hard at work on ACF 6.1, and Beta 1 is now available 🚀— Advanced Custom Fields (@wp_acf) March 16, 2023
This release includes custom post type and taxonomy registration, an improved experience when selecting field types, PHP 8.1 and 8.2 compatibility, and more!
Let’s take a look 🧵https://t.co/Y0WcAT11l4
© 2023 Advanced Custom Fields.