Find posts by related taxonomy field
You’re meta querying on serialized data. I mean the artist from ‘key’ => ‘artist’ is serialized. That’s why your meta query hasn’t work. So here is my possible solution- $projects = get_posts(array( ‘post_type’ => ‘project’, ‘meta_query’ => array( array( ‘key’ => ‘artist’, // name of custom field ‘value’ => ‘”%’ . $artist->term_id . ‘%”‘, ‘compare’ … Read more