How to Filter Posts by Custom Fields?

Since you have not provided any code, below code snippet assumes a ‘property’ as post type and price as meta field. I think the code will provide you some direction and you can take it from there. Feel free to make changes as needed:


$args = array('post_type' => 'property',
              'meta_key' => 'price',
              'orderby' => 'meta_value',
              'order' => 'ASC',
              'meta_query' => array(array('key' => 'price','compare' => '=',))
              );
$query = new WP_Query($args);