Home › Forums › General Issues › filtering by custom field entry › Reply To: filtering by custom field entry
Hi @herrfischer
This is what you need to do:
1. Create a select field with the options
2. Write some jQuery to trigger a function on change of this select
3. Get the JS function to do an AJAX call to a WP ajax function
4. Create this WP ajax function in your functions.php
5. Get your JS to post the selected value to the php function
6. Get your php function to use this value to filter the posts and return the correct data
7. Get your js function to use this data on complete.
You will find a tutorial in the docs on querying the posts based on a custom field value, the rest is up to you and google.
Thanks
E
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.