How to sort by meta value num, but ignore zero value?
You can use a meta_query in your WP_Query $args = array( ‘post_type’ => ‘company’, ‘meta_query’ => array( array( ‘key’ => ‘service_XXXX_price’, ‘value’ => ‘0’, ‘compare’ => ‘!=’, ), ), ); $company_query = new WP_Query( $args ); You can find more infos about the meta querys in the codex: https://codex.wordpress.org/Class_Reference/WP_Query