Home › Forums › General Issues › Sort by custom text(number) › Reply To: Sort by custom text(number)
Yes, you would probably need to use a URL parameter. The first thing you’re going to need to do is add a custom URL parameter, it needs to be something that won’t conflict with WP. Then output these URLs into the page.
Then you need to get this query argument and alter the post query to short by your custom field either ‘ASC’ or ‘DESC’ depending on what link is clicked. http://www.advancedcustomfields.com/resources/query-posts-custom-fields/
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.