Home › Forums › General Issues › Not showing content of Repeater Field › Reply To: Not showing content of Repeater Field
The same, no errors, but no output.
The thing is that I’m using ACF pro with other filed types without problems, in the loop and as options page. I’ve just buy it to use the repeater field, and I followed the official reference here (http://www.advancedcustomfields.com/resources/repeater/) but is NOT working, and I need help with this.
I’m using WordPress 4.0 and the las versiĆ³n of ACF Pro.
Im using it in header.php after body tag:
<!doctype html>
<html class="no-js" <?php language_attributes(); ?> >
<head>
<!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]-->
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title><?php wp_title( '|', true, 'right' ); ?></title>
<link rel="icon" href="<?php echo get_stylesheet_directory_uri() ; ?>/assets/img/icons/favicon.ico" type="image/x-icon">
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="<?php echo get_stylesheet_directory_uri() ; ?>/assets/img/icons/apple-touch-icon-144x144-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="<?php echo get_stylesheet_directory_uri() ; ?>/assets/img/icons/apple-touch-icon-114x114-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="<?php echo get_stylesheet_directory_uri() ; ?>/assets/img/icons/apple-touch-icon-72x72-precomposed.png">
<?php wp_head(); ?>
<?php Short_head_styles(); ?>
<?php /* ACF - Options Page */ require_once('header-custom-styles.php');?>
<script type="text/javascript">
// SLIDE NAVIGATION
$(function() {
$('a[href*=#]:not([href=#])').click(function() {
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
if (target.length) {
$('html,body').animate({
scrollTop: target.offset().top
}, 1000);
return false;
}
}
});
});
</script>
</head>
<body <?php body_class(); ?> id="home">
<section id="main-container" class="container" role="document">
<style type="">
#nav-menu{background: rgba(0,0,0,0.5);width:100%;}
</style>
<div id="nav-menu">
<div class="row"><?php CGrid_top_bar(); ?></div>
</div>
<script>
var navigation = responsiveNav(".nav-collapse", {
animate: true, // Boolean: Use CSS3 transitions, true or false
transition: 284, // Integer: Speed of the transition, in milliseconds
label: "Menu", // String: Label for the navigation toggle
insert: "after", // String: Insert the toggle before or after the navigation
customToggle: "", // Selector: Specify the ID of a custom toggle
closeOnNavClick: false, // Boolean: Close the navigation when one of the links are clicked
openPos: "relative", // String: Position of the opened nav, relative or static
navClass: "nav-collapse", // String: Default CSS class. If changed, you need to edit the CSS too!
navActiveClass: "js-nav-active", // String: Class that is added to <html> element when nav is active
jsClass: "js", // String: 'JS enabled' class which is added to <html> element
init: function(){}, // Function: Init callback
open: function(){}, // Function: Open callback
close: function(){} // Function: Close callback
});
</script>
<!-- Ressponsive Nav Menu End -->
<?php // youtube video
if ( is_front_page() && $bkg_vid_online) {
require_once('video-bkgs.php');
} ?>
<?php
// $bkg_slide_gallery = get_field('bkg_slide_gallery', 'option');
// echo $bkg_slide_gallery;
// var_dump($bkg_slide_gallery);
// check if the repeater field has rows of data
if( have_rows('bkg_slide_gallery') ):
// loop through the rows of data
while ( have_rows('bkg_slide_gallery') ) : the_row();
$image = get_sub_field('image');
echo '<img src="'. $image['url'] .'" />';
endwhile;
else :
echo "nada que mostrar"; // no rows found
endif;
?>
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.