Support

Account

Home Forums Backend Issues (wp-admin) Post Object – only query current user Reply To: Post Object – only query current user

  • I think I’m almost there using a custom filter function in functions.php

    function my_post_object_query( $args )
    {
    
        $args['author'] = '2';
    
        return $args;
    }
    
    add_filter('acf/fields/post_object/query/name=my_post_object_field_name', 'my_post_object_query', 10, 3);

    The only thing I need to figure out is, how to dynamically set the ID to the current user/author.