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[0].'">';?></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 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.