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)

The topic ‘Query posts with an ACF block using Post Object field’ is closed to new replies.