Support

Account

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 !!