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…
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.