<div class="section2">
<?php
// Stop if there's nothing to display.
if (!have_rows('section2')) {
return false;
}
if (have_rows('section2')):
?>
<?php while (have_rows('section2')): the_row();
// Services Sub Repeater.
if (have_rows('packages')): ?>
<?php
while (have_rows('packages')): the_row();
$title = get_sub_field('title');
$quote = get_sub_field('quote');
$image = get_sub_field('image');
$title_image = get_sub_field('title_image');
$caption = get_sub_field('caption');
$desc = get_sub_field('desc');
$link_text = get_sub_field('link_text');
$link = get_sub_field('link_text');
?>
<div class="container">
<h1><?php echo esc_html($title); ?></h1>
<div class="quote-triangle">
<p>
<?php echo esc_html($quote); ?>
</p>
<div class="quote__moving-border"></div>
</div>
<div class="wrapper-content">
<div data-aos="fade-right">
<div class="wrapper-content__leftside">
<img src="<?php echo $image['url']; ?>" alt="" class="left-side__icon">
</div>
</div>
<div data-aos="fade-right" data-aos-delay="200">
<div class="wrapper-content__rightside">
<h6><?php echo esc_html($title_image); ?></h6>
<div class="caption"><?php echo esc_html($caption); ?></div>
<div class="desc">
<?php echo esc_html($desc); ?>
</div>
<div class="click">
<a href="<?php echo $link; ?>" class="click__a">
<img src="<?php bloginfo('template_directory');?>/assets/img/icons/right-arrow-grey.svg" alt=""
class="click__right-arrow">
<h6><?php echo esc_html($link_text); ?></h6>
</a>
</div>
</div>
</div>
</div>
</div>
<?php endwhile;?>
<?php endif;?>
<?php endwhile;?>
<?php endif;?>
</div>
这段代码是组内的 Reapeter我从那个链接https://allisontarr.com/2017/12/01/acf-repeater-within-group/得到这个代码除了 $image我努力改变之外所有变量都正常工作标签内的代码 PHP 但什么也没发生。顺便说一句,我是 Wordpress 的新手,希望能找到解决方案,谢谢。