Support

Account

Forum Replies Created

  • Hi Eliot,

    I figured it out — with your guidance of course!

    I updated the code based on your sample that takes just one selection to the following:

    <?php while(the_repeater_field('home_clients_logos')): ?>
        <?php $clientLink = get_sub_field('client_link'); ?>
         <li><a href="<?php echo get_permalink(28); ?>
            <?php if( $clientLink ) : ?>
                <?php $post = $clientLink; ?>
                <?php setup_postdata( $post ); ?>#<?php echo get_the_ID(); ?>
                <?php wp_reset_postdata(); ?>
            <?php endif; ?>"></a></li> 		
    <?php endwhile; ?>

    I replaced:
    <?php the_sub_field( 'client_link', $post->ID ); ?>

    with:
    <?php echo get_the_ID(); ?>

    Thanks again for your help and super-quick response!

  • I just made the change to the code. It’s the same result, unfortunately.

    Is the fact that it is inside of a query_posts while loop a potential issue? Would I need to reset the post data just before this code starts?

Viewing 2 posts - 1 through 2 (of 2 total)