The Code Snippets plugin is a great WordPress plugin that allows site admin users to add custom code to their website with as little fuss as possible. The plugin offers a bunch of features that will ensure you will not destroy your website and get the white screen of death.
Code Snippets is especially awesome for newbies that are just starting to add custom code to their website. With highlighted syntax issues and errors, the plugin will help ensure added code is unlikely to break your website. If your snippets causes a fatal the plugin will automatically deactivate the code snippet to protect you website.
Best of all there is no need to edit theme files via ftp/sftp, and as these functions and code snippets are not within your theme files, they are not lost or deactivated when you change themes.
To install the plugin on your WordPress install, search for Code Snippets by Shea Bunge in the Plugins > Add New dashboard screen.
Once activated, admin roles users can add a code snippet via the Snippets menu item in the Dashboard. Or one can import one of our snippets via the plugin Snippets > Imports menu item.
How to import one of our code snippets from our blog.
To import a code snippet from our blog, firstly download the json file from the article. Ensure you have the Code Snippets plugin install and activated and then in your WordPress dashboard navigate to Snippets > Install.
It’s best to run with the default settings, which will ensure you will not end up with duplicated code snippets which can cause errors and issues. Select the file to upload that you recently downloaded in the “Upload Files” section, and click the “Upload and import” button.
Once imported, navigate to Snippets > All Snippets and activate the snippet you just installed. The code snippet will now be taking effect on your website.