Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Excluding custom query with order and orderby parameter #118

Open
mplusb opened this issue Aug 11, 2022 · 1 comment
Open

Excluding custom query with order and orderby parameter #118

mplusb opened this issue Aug 11, 2022 · 1 comment

Comments

@mplusb
Copy link

mplusb commented Aug 11, 2022

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
Copy link
Author

mplusb commented Aug 11, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant