Support

Account

Home Forums Gutenberg Query posts with an ACF block using Post Object field

Unread

Query posts with an ACF block using Post Object field

  • I just started using the latest version of ACF with Block support and I love it!

    I made a custom block that pulls in data from related pages and it is working great. However, on those pages, I want to query for posts that are related. If I were using a regular Post Object field, I’d just do a WP_Query for my post_type and a meta_query for that custom field to see if it contains this post’s ID.

    Post Object inside Block

    How would I write a query like that to target the field inside of a custom block?

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.