So I’m very new to this but have spent the last few days trying to work it out.
I have a custom post order for my posts which is the same throughout all category pages which I’d like to keep when people hit those pages. What I’m looking to do is sort the posts by a custom field (price) using a link or button clicked by the client…
ie – sort by price (low to high)
– sort by price (high to low)
in my functions page which makes all category pages sorted by the custom field (price) on initial load but I can’t figure out how to keep my initial post order and activate the function when someone clicks a button or visits a specific link.
Ideally when the front end user clicks something the page reloads with all posts in that category re-ordered by my custom field.
Viewing 1 post (of 1 total)
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Page Builder Summit Sponsors! BIG thanks to these people who’ve sponsored the Page Builder Summit: Akshat Choudhary from WP Remote @wpremote Elliot Condon from ACF @wp_acf Dimitrie Baitanciuc from Brizy @themefuse Dennis Dornon from MainWP @mymainwp