Home › Forums › ACF PRO › Relationship field in a block › Reply To: Relationship field in a block
@kiwicreative I added the code to the block, but this is where I think something more fundamental is going on.
The $posts variable seems to be empty. I have a block that adds custom fields to the page they’re assigned to. That works fine.
What I want to do is pull the same fields into the related page in a block. The if( $posts )
conditional appears to evaluate as false and renders nothing in the block.
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.