Snippet Shortcodes
  • Welcome
  • Getting Started
    • Page
    • Quickstart
    • What is the Premium Plugin?
    • Creating your first shortcode
  • Features
    • Overview
      • Auto-insert into Header / Footer
      • Limit to Device Types
    • Your own Shortcodes
    • Ready-made Shortcodes
      • Premium
        • Database values by ID
        • WooCommerce Meta Fields
        • WordPress User fields
      • Core
    • CSV Import
  • Further Info
    • Pricing & getting a license
  • Release notes
  • Contact / Issues
  • Download Links
    • Core plugin
  • Premium Plugin
Powered by GitBook
On this page
  • Viewing all your shortcodes
  • Adding or editing a shortcode
  • Custom Parameters
Edit on GitHub
  1. Features

Your own Shortcodes

PreviousLimit to Device TypesNextReady-made Shortcodes

Last updated 5 days ago

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.

Viewing all your shortcodes

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.

Adding or editing a shortcode

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.

Custom Parameters

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.

[ sv slug="render-table" border="0" background="#FFFFFF" width="50%" site-title="YeKen"]

Each argument can be rendered into the shortcode in the with the following syntax %%background%%, %%width%%, etc. Below is an example:

<table border=”%%border%%” style=”background:%%background%%” width=”%%width%%”>
   <tr>
   <td>Welcome to our site, %%site-title%%.</td>
   </tr>
</table>

, choosing whether the shortcode should appear on desktop, tablet, or mobile devices.

, eliminating the need to manually place it on each page.

Limit display by device type
Automatically insert the shortcode into your site’s header or footer