Hello, can someone explain for me where is the problem in this code?
<?php
global $query_string;
query_posts ('posts_per_page=5');
?>
<?php if ( have_posts () ): while(have_posts() ): the_post();?>
<div class="partner-card">
<div class="inside-card">
<img class="img-fluid" src="<?php echo get_the_post_thumbnail_url(); ?>" alt="">
<a href="<?php the_permalink();?>"><?php the_title();?></a>
</div>
</div>
<?php endwhile;?>
</div>
</div>
<?php endif; ?>
If is set query_posts my url_group code dont show.
<?php if ( have_rows( 'url_group' ) ) : ?>
<?php while ( have_rows( 'url_group' ) ) :
the_row(); ?>
<?php
$links = get_sub_field( 'url' );
if ( $links ) :
$link_url = $links['url'];
$link_title = $links['title'];?>
<a class="button" href="<?php echo esc_url( $link_url ); ?>" target="<?php echo esc_attr( $link_target ); ?>"><?php echo esc_html( $link_title ); ?></a>
<?php endif; ?>
<?php endwhile; ?>
<?php endif; ?>