Home › Forums › Front-end Issues › custom field group not displaying in wp query loop for a custom post › Reply To: custom field group not displaying in wp query loop for a custom post
$testimonial_include_image = get_field(‘testimonial_include_image’); $testimonial_how_many = get_field(‘testimonial_how_many’); $testimonial_cols = get_field(‘testimonial_cols’); $testimonial_author = get_field(‘testimonial_author’); $testimonial_content = get_field(‘testimonial_content’); $testimonial_image = get_field(‘testimonial_image’);
The above code is outside the loop. the_field and get_field functions should have a post ID if not such ID is given.
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!
© 2022 Advanced Custom Fields.