Search custom post type by meta data
In this case, as you mix pretty permalinks with request parameters, I would use the $_GET variables in your query. $query_args_meta = array( ‘posts_per_page’ => -1, ‘post_type’ => ‘nc_property’, ‘meta_query’ => array( ‘relation’ => ‘AND’, array( ‘key’ => ‘nc_bedrooms’, ‘value’ => sanitize_text_field( $_GET[‘bedrooms’] ), ‘compare’ => ‘LIKE’ ), array( ‘key’ => ‘nc_type’, ‘value’ => sanitize_text_field( … Read more