How to add a Snippet (PHP or JS)

Many of our documentation articles involve using custom code snippets. Here is how to add a snippet to the site safely and easily.

1. Install and activate this free plugin:

By using the plugin above you can add snippets safely without having to worry about errors or breaking the site.

2. For JavaScript snippets go to Snippets -> All Snippets -> Example JavaScript Snippet:

Enable the snippet and click EDIT

Then you can copy paste the snippet itself here:

Click "Save Changes" and that's it.

3. For PHP Snippets go to Snippets -> ADD NEW

Then copy paste the code here:

Click "Save Changes" and that's it.

Powered by BetterDocs