Home › Forums › Front-end Issues › Custom Post Type: Order posts by a group's field at archive page › Reply To: Custom Post Type: Order posts by a group's field at archive page
dgaitan thank you for your reply.
I tried both ways suggested!
The pre_get_posts hook solutions looks so clean … though either did the trick!
When I placed the arguments suggested at the first solution no custom posts are fetched on my archive page.
When I edit the pre_get_posts hook it even erased all the text from the rest of the page (header and footer).
The only way it fetches results is when I remove from my args the meta_key and order_by options. Using this way though all custom posts are ordered by the date a custom post is published.
I find it really weird.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!