Home › Forums › Add-ons › Repeater Field › Fill up repeater fields with category › Reply To: Fill up repeater fields with category
so guys i come to you with some research !
I have tried two things, firstly to grab my categories with something like
$args = array('parent' => 779);$categories = get_categories( $args );
foreach($categories as $category) {
echo ''.$category->cat_name.'';
This give me the categories for the current post, and i try to insert it as a row inside my repeater with this inside of my functions.php
$toto = 'images';
$row = array(
'image' => 'ahoy'
);
add_row('images', $row);
But it seem to not working, in fact i don’t understand why the add_row is not working at all, i tried a lot of different configuraiton (even the field solution one) but not any ideas about this
This is wherei am so far ! I keep you in touch if i progress !
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.