Home › Forums › ACF PRO › Looping CPT with Taxonomy field returns CPTs but not ACF fields in the CPT › Reply To: Looping CPT with Taxonomy field returns CPTs but not ACF fields in the CPT
Is this in an ACF block? Or a template? Usually when this happens, it’s an issue with the post ID being used for the_field within the loop.
So if, for example, you had this loop inside of an ACF block, it may be looking for those fields on the block itself, not the looped post. Or it could be looking for these fields on the page the loop is on vs. the individual looped post.
You could try passing the post ID to the_field calls within the loop to see if that works. Without knowing really the context of where this loop exists, it’s hard to say for sure.
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!
© 2023 Advanced Custom Fields.