Home › Forums › Front-end Issues › Sort CPT using pre_get_post not working › Reply To: Sort CPT using pre_get_post not working
Hi @nowton
Have you made sure that you even make it inside the if statement? Perhaps there’s something with it that you’ve overlooked so the conditions aren’t met.
Also, I don’t think you need to set orderby to meta_value_num for dates.. I think meta_value is quite enough especially if you have a format like say Y-m-d
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!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.