Skip to main content

8.5.36

🚀 Features / Improvements

  • Improved shortcode rendering in the templates. Now you can pass parameters into placeholders in a shortcode, as shown below.
{{shortcode '[something id="{{1}}"]' myVar}}

{{shortcode '[something id="{{1}}" otherParam={{2}}]' myVar anotherVar}}
  • Added nested parameters support for the shortcodes:
{{shortcode '[something id="{{post.acf.fieldName}}"]'}}

This is useful when you are iterating over an array. You can pass current array item into the shortcode using this:

{{#each myArray}}
{{shortcode_inline '[something id="{{var}}"]' this}}
{{/each}}

🐞 Fixes

  • Fixed {{shortcode_inline ...}} rendering which was triggering errors on some servers due to the incorrect Content-type being set as json. Now the content type is set as text/plain.