0
對於一些未知的原因,我不能循環出中繼場在我的面前,page.php文件。我將聖人主題作爲基礎。WordPress的聖人模板不能循環了ACF中繼場
這是我base.php是什麼樣子:
<?php
use Roots\Sage\Setup;
use Roots\Sage\Wrapper;
?>
<!doctype html>
<html <?php language_attributes(); ?>>
<?php get_template_part('templates/head'); ?>
<body <?php body_class(); ?> style="background-color: rgba(0,0,0,1);">
<!--[if IE]>
<div class="alert alert-warning">
<?php _e('You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.', 'sage'); ?>
</div>
<![endif]-->
<?php include Wrapper\template_path(); ?>
<?php
do_action('get_footer');
get_template_part('templates/footer');
wp_footer();
?>
</body>
</html>
這是我的前page.php文件的樣子:
<div class="slider-circles">
<?php if(have_rows('field_56e7d8bebb545')): ?>
<?php while (have_rows('field_56e7d8bebb545')) : the_row(); ?>
<p id="slide1" data-bgimage="<?php the_sub_field('field_56e7d8cebb546'); ?>" class="transparent-circle slick-active"></p>
<?php endwhile; ?>
<?php endif; ?>
</div>
有趣的是,我已經這樣做了完全一樣的幾天前在其他項目上的事情,一切正常。我絕對不知道爲什麼它現在無法正常工作:/
我已經將它們在我的可溼性粉劑管理員。你的代碼似乎也沒有工作。 –
添加: 什麼輸出? –
我已經試過各種可能的後續代碼var_dump,沒有工作,甚至不是一個簡單的the_title()轉儲 –