I have created an ACF post type called “Dashboard” which has a field for user selection called “usersacf”.
I need to show the post called “Dashboard” only to the user who enters from the “usersacf” field. This is the query ID I used. But not working. It is designed in Elementor.
function my_post_object_query( $args )
{
$args[‘author’] = get_current_user_id();
return $args;
}
add_filter(‘acf/fields/post_object/query/name=usersacf’, ‘my_post_object_query’);