Home › Forums › Add-ons › Repeater Field › Need your help about have_rows function › Reply To: Need your help about have_rows function
Hi @dagiac
All ACF functions will load and save data to a $post. This is an important concept to understand.
The shortcode will work on your single template, buecause WP understands there that all the info on that page is related to a single $post, and ACF can load / save data to that $post.
On your ‘archive’ page, It is most likely that ACF does not know which $post to load the data from.
Is the ‘archive’ page looping through the ‘tour’ posts?
For each post, is it using the the_content()
function to output text?
If the_content()
is not being used within the loop, the shortcode will never be called. You can remove the ACF code from your shortcode function and simply try to output some data about the $post, thus removing the potential issue of ACF.
Once you can confirm that the shortcode is running in the correct template, and that the $post data is correct, you can add back in the ACF code.
Thanks
E
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.