Home › Forums › General Issues › Relationships works fine on post type but not on block? › Reply To: Relationships works fine on post type but not on block?
I have got this to work by not using the <?php setup_postdata($post);?> and instead using the ‘$featured_post->ID’ method.
Still confused by the need to use two different methods for different parts of the site, as I said my code above works fine on the blog single.php template but not when used in a block – if anyone knows why I’d love to know.
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.