Skip to main content
What are the Differences Between Dynamic Shortcodes and Tokens?
Updated over a week ago

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

Speed of interpretation

πŸš€

🐒

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?