Your own Shortcodes
Last updated
Last updated
The greatest strength of Snippet Shortcodes lies in its ability to let you build a centralised library of reusable shortcodes. This means you can display the same content across your site, while managing it from a single, easy-to-update location.
The initial screen under Snippet Shortcodes > Your Shortcodes displays all of your existing shortcodes. If you're using the Premium version, you can edit and toggle settings directly inline. Each shortcode also includes options to edit or delete as needed.
When adding or editing a shortcode, you’ll see a screen where you can define the shortcode’s slug and specify the content it should render wherever it’s used on your site.
In addition to content and slug settings, the editor also allows you to:
Make the shortcode global across a WordPress multisite network, allowing it to be shared and used consistently across all sites.
Enable or disable individual shortcodes, giving you fine-grained control over what’s active at any given time.
These advanced options give you greater control over how, where, and when your content appears — streamlining management while boosting flexibility.
In some cases, you may want to make your shortcodes more flexible and extendable — and that’s where parameters come in.
For example, suppose you have a shortcode that renders an HTML table. Depending on where you use it on your site, you might want to customise its appearance by specifying additional arguments. In the example below, you can see how parameters like "border"
and "background"
are passed into the shortcode to modify its output dynamically.
Each argument can be rendered into the shortcode in the with the following syntax %%background%%, %%width%%, etc. Below is an example:
, choosing whether the shortcode should appear on desktop, tablet, or mobile devices.
, eliminating the need to manually place it on each page.