All Collections
Dynamic Shortcodes
What are the Differences Between Dynamic Shortcodes and Tokens?
What are the Differences Between Dynamic Shortcodes and Tokens?
Updated this week

The idea of creating Dynamic Shortcodes comes from our experience with Tokens, a feature we have in the Dynamic Content for Elementor plugin.

We rewrote the syntax from scratch with the main goal of improving performance, enabling things that were not feasible before and making it available for the entire WordPress system.

Contrary to Dynamic Shortcodes, Tokens was meant to be a very simple tool to insert dynamic values. It later grew other features on top of this base in order satisfy customers needs, but was not designed from the ground up for the added complexity.

This unfortunately shows up in its implementation, its design and functionality.

For starter, Tokens does not have conditions, loops, templates, ways to handle variables. It's architecture and implementation makes it impossible for Tokens to be extended.

Compatibility

Tokens is an Elementor's only tool while Dynamic Shortcodes targets many Page builders and editors.

Composability

Dynamic Shortcodes are fully composable. This means that one shortcode can be nested within the other without limit.
For example I can do a query whose attributes are set from ACF Fields, example:

{query:user @ role={acf:role}}

With Tokens this is not possible, as Tokens can only be composed in limited number of ways.

Power Dynamic Shortcodes

This is an extremely powerful tool that does not exist at all in Tokens. In short, administrators can save Dynamic Shortcodes snippets that can be reused many times (use many times, change once). Since they are written only by administrators they have no security restrictions.

Impact on loading time

While Dynamic Shortcodes has virtually no impact on a site loading time, Tokens unfortunately can have a considerable impact based on the type of Tokens enabled and their usage.

Summary

Features

Dynamic Shortcodes

Tokens

Compatibility

Elementor Free
Elementor Pro
Gutenberg
Full Site Editing
Oxygen
Breakdance
Classic Editor

Elementor Free
Elementor Pro

Show Custom Fields

Manage Dates

Executing expressions

Limited

Manage conditions

Support for nested values

Speed of interpretation

Loop for ACF Repeater

Loop for ACF Relationship

Loops

Execute Query

Variables

Cache support

PHP Functions

Possible expansion by third-party developers


Did this answer your question?