Home › Forums › Add-ons › Repeater Field › get_field occassionally returning string with repeater field › Reply To: get_field occassionally returning string with repeater field
Hi John, ok thanks very much for that!
Apologies for the much later reply, but I have found some of the code that you mentioned. In the file used for the thumbnails there is the following code;
add_action( 'pre_get_posts', 'add_my_post_types_to_query' );
function add_my_post_types_to_query( $query ) {
$query->set( 'post_type', array( 'post', 'event' ) );
return $query;
}
So now this is finally all making sense – this is the main problem here (whenever this file is being used and this code is executed, the repeater fields failed to load as described). And whenever this file is used, the thumbnails work and the repeat fields don’t. Thanks very much for helping me find this!
Now can I ask if you have any idea on how to fix this? As I say I didn’t create this theme so I’m not sure on how it works, so your help would be very much appreciated!
Thanks,
Aidan
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.