I am doing a theme for a client that needs to sort custom posts by a custom field. This sounds easy, especially sense we have orderby=mete_value_num. This works great unless you have numerical values above 100,000, say like the price of a house. The important bit of my current query looks like this
$my_query->query( array( 'listing-area' =>'lake-murray-lakefront', 'post_type' => 'homes', 'posts_per_page' => '-1', 'meta_key' =>'price', 'orderby' => 'meta_value_num', 'order' => 'DESC' ) );
..where ‘price’ is my custom field. It sort of sorts them. But not in the correct order.
What am I doing wrong? How can I get these posts to be sorted in the correct order. I have Google’d for hours looking for a solution that will fit into WP. Any help will be greatly appreciated.