Home › Forums › General Issues › Display fields from two post types in one loop/template › Reply To: Display fields from two post types in one loop/template
Hi @lowercase
The_field() functions is used to echoes the returned value. Since the post object field returns WP_Post object, you’ll get that error because PHP doesn’t allow you to echo an object. Please take a look at this page to learn more how to show a post object field: https://www.advancedcustomfields.com/resources/post-object/.
I hope this makes sense.
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.