An easy, clean and simple way to add code snippets to your site.
Snippets that you add to this plugin are not meant to be inserted into the text editor. Instead, they are run on your site just as if they were added to your functions.php file.
No, just copy all the content inside those tags. If you accidentally forget (or just like being lazy), the tags will be stripped from the beginning and end of the snippet when you save it. You can, however, use those tags inside your snippets to start and end HTML sections
You can try activating 'safe mode'. All snippets will not execute while safe mode is active, allowing you to access your site and deactivate the snippet that is causing the error. To activate safe mode, add the following line to your wp-config.php file, just before the line that reads
/* That's all, stop editing! Happy blogging. */:
To turn safe mode off, either comment out this line or delete it.
You can also activate safe mode on a per-page basis by appending
?snippets-safe-mode=true to the URL.
Yes. Just add it but do not activate it yet.
No, the snippets are stored in the WordPress database and are independent of the theme and unaffected by WordPress upgrades.
Yes, when you delete Code Snippets using the 'Plugins' menu in WordPress it will clean up the database table and a few other bits of data. Be careful not to remove Code Snippets by deleting it from the Plugins menu unless you want this to happen.
Yes! You can individually export a single snippet using the link below the snippet name on the 'Manage Snippets' page or bulk export multiple snippets using the 'Bulk Actions' feature. Snippets can later be imported using the 'Import Snippets' page by uploading the export file.
Yes. Click the checkboxes next to the snippets you want to export, and then choose Export to PHP from the Bulk Actions menu and click Apply. The generated PHP file will contain the exported snippets' code, as well as their name and description in comments.
You can run snippets across an entire multisite network by Network Activating Code Snippets through the Network Dashboard. You can also activate Code Snippets just on the main site, and then individually on other sites of your choice.
Snippets are stored in the
wp_snippets table in the WordPress database. The table name may differ depending on what your table prefix is set to.
That's fantastic! Fork the repository on GitHub and send me a pull request.
Requires: 3.6 or higher
Compatible up to: 4.7.2
Last Updated: 1 day ago
Active Installs: 30,000+
1 of 11 support threads in the last two months have been marked resolved.
Got something to say? Need help?