What is Shortcode Variables?

Do you want to use the same snippet of text or HTML throughout your site but only have to change the value in one location? If so, this plugin maybe just what you need.

Create your own Shortcodes and assign content to them. Using the standard WP editor, you can add text, HTML, JavaScript, images or other elements that your WordPress install and plugins allow. The main advantage is ability to create a shortcode once and re-use it throughout your site.

[ sv slug="your-slug-name"]

Features

  • Create a shortcode once and place in multiple locations.
  • Update the shortcode in one location and it changes throughout your site.
  • Parameters to extend your shortcodes.
  • Free and Premium helper shortcodes to make life easier.

Specify Parameters

In some cases you may wish to make your shortcodes more extendable. This is where parameters come in. For example, you may have a shortcode that renders a HTML table, however, depending on where you place that shortcode on your site, you may wish to specify additional arguments. Take the example below, you can see the additional arguments passed into shortcode, “border”, “background” etc.

[ 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>