Home Forums General Issues Shortcodes within other shortcode\'s attributes


Shortcodes within other shortcode\'s attributes

  • How is it possible to add an acf shortcode in another shortcode’s attribute?

    for example:
    [otherShortcode attr="[acf field='field_name']"]

  • I found that you can change the square brackets [] to {}, for example:
    [otherShortcode attr="{acf field='field_name'}"]
    but that didn’t work for me!

    Any suggestions?!

  • Hi @auroric-designs ,

    Thanks for the post.

    Unfortunately ACF shortcodes cannot be used within other shortcodes.

    The API expects the shortcodes to be called from within the WYSIWYG editor and will only work for simple text based values.

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

You must be logged in to reply to this topic.