Home › Forums › Front-end Issues › How to use the Post Object field to link custom posts? › Reply To: How to use the Post Object field to link custom posts?
Hi @andymacleod
When on the unit
single page, you can load the lessons with a get_posts
function. You can learn more about this here:
http://www.advancedcustomfields.com/resources/how-to/how-to-query-posts-filtered-by-custom-field-values/
Notes:
1. You do not need to ‘modify’ the loop
2. Use get_posts to load the lessons and loop over them
3. Your meta_query args should find posts where 'post_object_field_name' => get_the_ID()
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.