# Your own Shortcodes

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.

<figure><img src="https://3958622721-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7uAQEFKsxwRu8q5XW3xQ%2Fuploads%2F5kWBKFc4MVqo6FP6XNP6%2Fimage.png?alt=media&#x26;token=20c671da-4136-4794-b46b-7ca4308b754b" alt=""><figcaption></figcaption></figure>

### 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.

<figure><img src="https://3958622721-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7uAQEFKsxwRu8q5XW3xQ%2Fuploads%2FZeKpo7tmYFdIQG8PAvVA%2Ffull-lisitng.png?alt=media&#x26;token=14ebc7ef-aae4-4723-99e5-8b3275ac1661" alt=""><figcaption></figcaption></figure>

### 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:

* [**Limit display by device type**](https://yeken.gitbook.io/snippet-shortcodes/features/interactive-blocks/limit-to-device-types), choosing whether the shortcode should appear on desktop, tablet, or mobile devices.
* [**Automatically insert the shortcode into your site’s header or footer**](https://yeken.gitbook.io/snippet-shortcodes/features/interactive-blocks/auto-insert-into-header-footer), eliminating the need to manually place it on each page.
* **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.

<figure><img src="https://3958622721-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7uAQEFKsxwRu8q5XW3xQ%2Fuploads%2FMnlbc7RurO7QjO4xzjiq%2Fadd-edit.png?alt=media&#x26;token=9d4be770-1beb-4b37-b713-fa02ed54d4df" alt=""><figcaption></figcaption></figure>

### Custom Parameters <a href="#specify-parameters" id="specify-parameters"></a>

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://yeken.gitbook.io/snippet-shortcodes/features/own-shortcodes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
