Support

Account

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