Home Forums Add-ons Repeater Field Shortcode for Repeater Field?


Shortcode for Repeater Field?

  • Hi,
    Is there a shortcode for repeater-field?

    Regards, Sebastian

  • Shortcodes in acf are only meant for “Basic” field types.

    It is possible to show the value of a basic field type in a repeater if you use the correct field name. Here is how repeater fields are stored

    // $repeater = name of the repeater field
    // $index = the row, starting at 0
    // $sub_field = name of the sub field
  • Hey John, thanks for the support.

    Could such a solution work?

    function acf_shortcode() {
         custom field php here
        return ob_get_clean();
    add_shortcode( 'shortcode_tag','acf_shortcode' );
  • Custom shortcodes are always a possible solution. Yes, you could create your own shortcode and supply parameters to output rows of a repeater.

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Shortcode for Repeater Field?’ is closed to new replies.