Add dynamic shortcodes

Il Dynamic Shortcode feature provides the ability to use a shortcode, dynamically, for anything that Elementor doesnโ€™t already provide a dynamic tag for. While the possibilities are limitless, here are a few examples:

  • Using any custom field plugin shortcodes that arenโ€™t natively supported by Elementor
  • Inserting an Elementor template via its shortcode
  • Using an external pluginโ€™s shortcode
  • Use self-coded shortcodes, for example, conditionally displaying different messages on the page based on a custom shortcode created by a developer
  1. If a widgetโ€™s field has a dynamic option, click on the Dynamic iconย dynamic icon Add dynamic shortcodes 1
  1. Selectย Shortcodeย from theย Siteย selections. This will addย Shortcodeย in the dynamic field.
  2. Enter your shortcode into theย Settings > Shortcodeย field.

Important: By default, for security reasons, the generated HTML while using shortcodes is being escaped. If you wish to disable the escaping add the following line to your themeโ€™s function.php file:

 add_filter( 'elementor_pro/dynamic_tags/shortcode/should_escape', '__return_false' ); 

0 commenti

Invia un commento

Il tuo indirizzo email non sarร  pubblicato. I campi obbligatori sono contrassegnati *