Advanced Custom Fields Sorting

We have renamed Post Grid plugin to Post Grid Combo
Ticket for: Post Grid
0
Advanced Custom Fields Sorting 1
nathan
Apr 17, 2019 01:23 AM 1 Answers
Member Since May 2018
Subscribed Subscribe Not subscribe
Flag(0)

I see in the options where I can sort by a meta field in the Post query orderby settings, but not for the meta fields created by Advanced Custom Fields (https://wordpress.org/plugins/advanced-custom-fields/)...

2 Subscribers
Advanced Custom Fields Sorting 1
Advanced Custom Fields Sorting 3
Submit Answer
Please login to submit answer.
1 Answers
Sort By:
Best Answer
0
Advanced Custom Fields Sorting 4
PickPlugins
Apr 17, 2019
Flag(0)

Welcome to our forum.

If your ACF custom field value save plain number or string you can use directly meta key under post grid settings, please use the option
Post query orderby > "Meta value(Number)" if your custom field value type is number otherwise use "Meta value"
https://imgur.com/IssizvW

Please watch my testing here with ACF plugin and post grid.

https://imgur.com/p9t7TaF

 

If this is still not working you can use filter hook to override query arguments,

https://pickplugins.com/documentation/post-grid/filter-hooks/post_grid_query_args/

Regards

Advanced Custom Fields Sorting 5
nathan
- Apr 17, 2019 11:09 PM
Flag (0)
0

This was very helpful, thanks!

Sign in to Reply
Replying as Submit