Home Forums General Issues Genesis Framework & Repeater Field


Genesis Framework & Repeater Field

  • I’m trying to get a repeater field working within a custom Genesis Framework page template. I have the following code, but the repeater fields are not showing. I’ve doubled check to ensure I have the correct field name for the repeater field. This is my first time using Genesis so that might be the issue here, as I’ve successfully added many repeater fields into other WP templates in the past.

     * Genesis Framework.
     * WARNING: This file is part of the core Genesis Framework. DO NOT edit this file under any circumstances.
     * Please do all modifications in the form of a child theme.
     * @package Genesis\Templates
     * @author  StudioPress
     * @license GPL-2.0+
     * @link
    //* Template Name: Top 10
    // Add our custom loop
    add_action( 'genesis_loop', 'cd_goh_loop' );
    function cd_goh_loop() {
    	$loop = new WP_Query( );
    	if( $loop->have_posts() ) {
    		// loop through posts
    		while( $loop->have_posts() ): $loop->the_post();
    			if(get_field('top_10_list')): ?>
    		  		<ul class="top-10-rows">
    					<?php while(has_sub_field('top_10_list')): ?>
    						<li class="top-10-list-row">
    								<li><?php the_sub_field('rank'); ?></li>
    								<li><a href="<?php the_sub_field('link');?>"><img src="<?php the_sub_field('company');?>" /></a></li>
    				        		<li><?php the_sub_field('price');?></li>
    				       			<li><?php the_sub_field('money_back');?></li>
    				        		<li><?php the_sub_field('features');?></li>
    				        		<li><?php the_sub_field('reviews');?></li>
    				        		<li><?php the_sub_field('more_info');?></li>
    					<?php endwhile; ?>
    			<?php endif;
  • Hey,

    did you ever find a solution for this? I’m having the same problem.

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Genesis Framework & Repeater Field’ is closed to new replies.