Home Forums Add-ons Repeater Field Repeater + WYSIWYG Shortcode


Repeater + WYSIWYG Shortcode

  • Hi Elliot,
    I have a problem with the repeater-field, repeating a wysiwyg-field with shortcodes.

    It seems that the part
    <?php if(have_rows('lists')): ?>
    already executes all shortcodes contained in the wysiwyg-fields inside ‘lists’.
    The result is, that all galleries in those wysiwyg-fields appear before (outside) the actual repeater-content. In the repeater-content itself, the shortcodes are already stripped out.

    Is there a way to prevent that?


  • Hi @mlohscheidt

    I’m not sure I understand the issue.
    The have_rows function will load the repeater field’s data and check that there are rows available. The WYSIWYG sub field values will also be loaded, and the values will be formatted (shortcodes will be run).

    Perhaps the issue is with your shortcodes. Normally, a shortcode filter would modify the content, not echo out some HTML.

    Is it possible that you can change your shortcode filters to return the value instead of outputting it?


  • Hi Elliot,
    thanks for your help and sorry for that unnecessary mistake 😉
    Of course the shortcode was the problem, because it already output the gallery…


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

The topic ‘Repeater + WYSIWYG Shortcode’ is closed to new replies.