simple-custom-post-order
simple-custom-post-order copied to clipboard
Excluding custom query with order and orderby parameter
In the WordPress plugin library it says “Excluding custom query which uses order or orderby parameters, in get_posts or query_posts and so on.” but this does not seem to work, or atleast cause trouble in the ordering.
When i order with ASC it works, but ordering with DESC seems to act the same as ASC. When i disable the plugin the ordering works.
Works:
[ "post_type" => CPT "posts_per_page" => -1 "post_status" => "publish" "order" => "ASC" "orderby" => "meta_value_num" "meta_key" => "price" ]
Does not work (still storts in ASC):
[ "post_type" => CPT "posts_per_page" => -1 "post_status" => "publish" "order" => "DESC" "orderby" => "meta_value_num" "meta_key" => "price" ]
https://wordpress.org/support/topic/excluding-custom-query-with-order-and-orderby-parameter/