Home › Forums › Add-ons › Repeater Field › Accessing Repeater Field from another page › Reply To: Accessing Repeater Field from another page
Okay. Worked it out.
I needed to change
if( have_rows('service', 'services') ):
while( have_rows('service', 'services') ): the_row();
to
if(get_field('service', 7)):
while(has_sub_field('service', 7)):
the second variable needs to be the post id not the page name.
Found the code on the ACF documentation.
http://www.advancedcustomfields.com/resources/how-to/how-to-get-values-from-another-page/
Under the heading: Working with the Repeater Field.
I thought I had read the page all the way through.
Hope it helps others.
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.