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

Ability to order by a custom field #39

Open
sewmyheadon opened this issue Feb 11, 2016 · 2 comments
Open

Ability to order by a custom field #39

sewmyheadon opened this issue Feb 11, 2016 · 2 comments
Assignees

Comments

@sewmyheadon
Copy link
Member

(such as created by Advanced Custom Fields)

@cyrrill
Copy link

cyrrill commented Nov 3, 2017

Actually, upon further research, this already supported with standard WP query variables:

[ic_add_posts showposts='10' category='sports' orderby='meta_value_num'  meta_key='sort_custom_field_name_here' order='ASC']

using the special orderby key of "meta_value" or "meta_value_num"

https://codex.wordpress.org/Class_Reference/WP_Query#Custom_Field_Parameters

@sewmyheadon
Copy link
Member Author

Howdy @cyrrill,

Thanks so much for reporting back!

We're working on a few updates to the plugin and the docs and will make sure to test and include this so others can benefit too.

Cheers!

@sewmyheadon sewmyheadon self-assigned this Nov 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants