Почему-то поля, созданные через ACF в шорткоде выводятся не на своих местах, а до всей html конструкции!!
function shortcode_offer_1($atts, $content = null) {
extract(shortcode_atts(array(
"post_num" => '',), $atts));
$offer_1 = '<div class="d-flex banner align-items-center space-around content-area-block">
<div class="d-flex">';
$offer_1.= '<a href="'.the_field('offer_url', $post_num).'"><img src="'.the_field('offer_image', $post_num).'" alt=""></a></div>';
$offer_1.= '<div class="d-flex align-items-center">
<span class="walmart">'.the_field('offer_title', $post_num).'</span>
</div>';
$offer_1.= '<div class="d-flex">
<a href="'.the_field('offer_url', $post_num).'" class="button button-banner">Go to login</button>
</div>
</div>';
return $offer_1;
}
add_shortcode("offer_1", "shortcode_offer_1");