WordPress custom post type -> query and sort by custom field with multiple values, then published date

You can use the relation = OR in your meta_query args. Something like this: $args = [ ‘post_type’ => ‘blogs’, ‘post_status’ => ‘publish’, ‘posts_per_page’ => 24, ‘meta_query’ => array( ‘relation’ => ‘OR’, ‘featured_clause’ => array( ‘key’ => ‘featured_post’, ‘value’ => ‘yes’, ‘compare’ => ‘=’ ), ‘not_featured_clause’ => array( ‘key’ => ‘featured_post’, ‘value’ => ‘no’, ‘compare’ … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)