Support

Account

Home Forums General Issues Images on page are the same as in the posts loop Reply To: Images on page are the same as in the posts loop

  • Hi @fanta00

    Please add your code using the code tag so it shows properly. Regarding your issue, I believe you can do something like this:

    $wp_query = new WP_Query($args);
    ?>
    
    <?php while ( $wp_query->have_posts() ) : $wp_query->the_post(); ?>
        <?php $top_post_banner = get_field('top_banner', get_the_ID()); ?>
        <img src="<?php echo $top_post_banner['sizes']['medium']; ?>" alt="<?php echo $top_post_banner['alt']; ?>" />
    <?php endwhile; ?><!– end of the loop –>
    
    <?php wp_reset_query(); ?>

    I hope this helps.