simple-custom-post-order icon indicating copy to clipboard operation
simple-custom-post-order copied to clipboard

Excluding custom query with order and orderby parameter

Open mplusb opened this issue 3 years ago • 1 comments

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" ]

mplusb avatar Aug 11 '22 08:08 mplusb

https://wordpress.org/support/topic/excluding-custom-query-with-order-and-orderby-parameter/

mplusb avatar Aug 11 '22 08:08 mplusb