How to use the Code Snippets plugin safely

The free Code Snippets plugin is an excellent option if you are not comfortable creating your own functionality plugin. It allows you to add custom PHP code directly through the WordPress dashboard without editing theme files.

Implementation steps

After installing and activating the plugin, go to Snippets → Add New, give your snippet a descriptive title and paste the PHP code into the editor.

Before activating the snippet, make sure it is configured to run only on the front end unless the instructions specifically require it to run everywhere.

To stay organised and keep your site maintainable, I recommend giving each snippet a very specific name, such as:

– ACFML 2.2.4 Link Field Workaround
– WPML String Translation Fix
– WooCommerce Multilingual Temporary Fix

Good naming makes it much easier to identify and remove temporary workarounds later.

Once you have saved and activated the snippet, test the affected functionality to confirm the issue has been resolved.

While a WordPress Functionality Plugin is my preferred professional solution, using the Code Snippets plugin is the most accessible way for non-coders to apply (WPML) workarounds.

Image courtesy of CodeSnippets