Home › Forums › Add-ons › Repeater Field › How can I query only repeater fields as if they were posts? › Reply To: How can I query only repeater fields as if they were posts?
No and at the same time yes. It is not possible using most of the standard ACF and WP functions. With an understanding of how repeater fields are stored in the postmeta table you could use $wpdb and build your own SQL queries to get them https://codex.wordpress.org/Class_Reference/wpdb
As far as the names of the fields, lets say that you have a repeater field named “repeater” with a subfield named “subfield”.
In the database there will be multiple entries
meta_key | meta_value
---------------------------------------------------------
repeater | number of rows in the repeater
repeater_0_subfield | content of first row of repeater
repeater_1_subfield | content of second row of repeater
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.