Display a query with multiple post types and same relationship on a single page

You’re setting the post meta as a_clients, but the query is looking for a_client.

update_post_meta($post_id, 'a_clients', $new);

'key' => 'a_client'

Those need to be the same. Since updating the query means you won’t have to go updating posts again, I suggest updating the key of the meta_query to a_clients.

Leave a Comment