Home Forums ACF PRO ACF field in an Object Tag. Reply To: ACF field in an Object Tag.

  • You cannot use shortcodes as an attribute of an element. This is a WP limitation/restriction.

    You will need to build your own shortcode that outputs all of the HTML to include ACF fields as attributes.

    Starting with version 4.2.3, similar limitations were placed on use of shortcodes inside HTML. For example, this shortcode will not work correctly because it is nested inside a scripting attribute:

    <a onclick="[tag]">