> For the complete documentation index, see [llms.txt](https://yeken.gitbook.io/snippet-shortcodes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://yeken.gitbook.io/snippet-shortcodes/features/interactive-blocks/auto-insert-into-header-footer.md).

# Auto-insert into Header / Footer

## Auto-insert into Header / Footer

#### Introduction

By default, your shortcodes are only rendered on your site when placed, say `[sv slug="business-development"]`, in the desired location.

In some instances, you may wish for a shortcode's content to be rendered automatically into your websites header or footer, for example for custom CSS or GA code.

<figure><img src="https://3958622721-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7uAQEFKsxwRu8q5XW3xQ%2Fuploads%2F49KyN57PB025kP7JIYuN%2Fnew-options.png?alt=media&#x26;token=d7b138fd-e8ef-41ed-b4b8-9ba367affe0c" alt=""><figcaption></figcaption></figure>

#### How to enable

When creating or editing a shortcode, you will notice a section under the editor called "Automatically inserting into the the selected locations below". It's really as simple as checking one or both of these check boxes and saving the shortcode.

#### Limiting to specific pages

By default, a shortcode set to auto-insert into the header and/or footer is added to **every** page on your site. If you only want it to appear on certain pages, use the "Only insert on these pages:" box directly below the Header/Footer checkboxes.

Enter one page slug per line (or comma-separated), for example:

```
contact-us
about-us
pricing
```

Leave the box blank to keep inserting on every page - this is the default behaviour and matches how auto-insertion worked before this option was added.
