Home Forums ACF PRO ACF Relationship queries with WP Rest API


ACF Relationship queries with WP Rest API

  • I’m attempting to query by an ACF relationship using the WP Rest API and was having some odd results. So with my setup I would expect the following to return results however nothing is returned.


    The odd thing is when I do what’s directly in the database for the value, I get results. See the following.


    FYI, to get this far I did need to expose the meta_query as it’s not typically usable in public queries. That was done by adding the following to my functions.php file.

    add_filter( 'rest_query_vars', 'test_query_vars' );
    function test_query_vars ( $vars ) {
        $vars[] = 'meta_query';
        return $vars;
Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.