Support

Account

Home Forums Add-ons Repeater Field post content into repeater fields Reply To: post content into repeater fields

  • Alright, if anyone reads this then I got it working.. However, there are problems…

    the code is

    			<?php 
    
    			$list = get_posts(array(
    				'post_type' => 'post',
    				'meta_query' => array(
    								array(
    								'key' => 'cat-to-prod', // name of custom field
    								'value' => '"' . get_the_ID() . '"',
    								'compare' => 'LIKE'
    					)
    				)
    			));
    
    			?>
    			<?php if( $list ): ?>
    				<?php foreach( $list as $list ): ?>
    								<?php
    								$feeds = get_field('_scrape_original_url', $list->ID);
    								$row = array(
    									'field_59dd767200980'	=> $feeds,
    											);
    
    									$i = add_row('field_59dd765c0097f', $row);
    								?>
    
    							<?php endforeach; ?>
    			<?php endif; ?>

    The problem is that it keeps adding the same values over and over to my repeater field in the product…