sandywp / plugins / code-snippets
Code Snippets
An easy, clean, and simple way to enhance your site with code snippets.
Ready in seconds.
v3.10.2 1,000,000+ installs WP 5.5+ PHP 7.4+

What you get inside
4 screens-
Managing existing snippets
-
Adding a new snippet
-
Editing a snippet
-
Importing snippets from an export file
About this plugin
✂ Code Snippets provides an effortless way to enhance your WordPress site.
🚀 Upgrade to Code Snippets Pro for complete CSS, JavaScript, Gutenberg, Elementor and cloud synchronisation integrations. Elevate your snippets experience now!
Say goodbye to the hassle of tweaking your theme’s functions.php file and downloading endless plugins – Code Snippets simplifies the process!
A snippet is like a mini-plugin for your WordPress site, providing added functionality without the clutter.
Unlike other solutions that involve dumping code into your functions.php file, Code Snippets offers an intuitive graphical interface for seamless integration and real-time execution. Managing snippets is as easy as activating and deactivating plugins, only without the bloat and overhead.
🎥 Watch a quick overview by Imran Siddiq:
☁️ Each copy of Code Snippets includes full integration with the community-powered Code Snippets Cloud platform, providing easy access to hundreds of tweaks and enhancements ready to power-up any WordPress site.
🌐 Connect with us:
🌟 Like our plugin? Find it useful? Please consider sharing your experience by leaving a review on WordPress.org. Your feedback is instrumental to shaping our future growth!
🌍 We’d like to thank the wonderful people who have helped contribute translations to allow Code Snippets to be used in different languages. You can find a full list here.
Questions
- How can I recover my site if it is crashed by a buggy snippet?
You can recover your site by enabling the Code Snippets safe mode feature. Instructions for how to turn it on are available here: https://codesnippets.pro/doc/safe-mode/.
- Will I lose my snippets if I change the theme or upgrade WordPress?
No, the snippets are stored in the WordPress database, independent of the theme and unaffected by WordPress upgrades.
- Can the plugin be completely uninstalled?
If you enable the ‘Complete Uninstall’ option on the plugin settings page, Code Snippets will clean up all of its data when deleted through the WordPress ‘Plugins’ menu. This includes all stored snippets. If you would like to preserve the snippets, ensure they are exported first.
- Can I copy snippets that I have created to another WordPress site?
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.
- Can I export my snippets to PHP for a site where I’m not using the Code Snippets plugin?
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.
- Can I run network-wide snippets on a multisite installation?
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.
- Where are the snippets stored in my WordPress database?
Snippets are stored in the
wp_snippetstable in the WordPress database. The table name may differ depending on what your table prefix is set to.- Where can I go for help or suggest new features?
You can get help with Code Snippets, report bugs or errors, and suggest new features and improvements either on the WordPress Support Forums or on GitHub.
sandywp / also on the shelf
Try another plugin
WPCode – Insert Headers and Footers + Custom Code Snippets – WordPress Code…
4.9 · 3M+ installs
Easily add code snippets in WordPress. Insert header & footer scripts, add PHP code snippets with conditional logic, insert…
5.0 · 200K+ installs
Easy add site-wide, category and article specific custom code before the closing </head> and </body>, or after…
4.7 · 100K+ installs
Add Custom CSS to your WordPress site without any hassles.
Spin up a real WordPress site in seconds.
Test plugins, build a demo, hand a client a link — then squash it and start again. No local setup, no Docker.