Home › Forums › Add-ons › Repeater Field › Showing ONLY repeater rows that contain a certain keyword › Reply To: Showing ONLY repeater rows that contain a certain keyword
Hi James @acf-support,
I was asking more along the lines of modifying the WP Search Query to search through repeater fields. Your solution above doesn’t show any results because the WP search query, by default, only looks at the title and content of a post. I am using SearchWP which allows to index custom fields, but repeater fields each need to be declared separately for indexing (please see attachment). This is pretty counter intuitive, as there is a chance that the repeater increment can be beyond what is declared.
Also, the results count is still considered as 1 (ONE) according to WP even if the query appears in multiple repeaters in ONE post.
I found this code (i haven’t tested yet) but it seems to only be for regular custom fields, not repeater fields. Do you think you can modify it to include repeaters?
https://gist.github.com/charleslouis/5924863
Thanks.
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.