ADD PHP CODE SNIPPETS TO YOUR SITE:

PHP code “snippets” change the functionality of your site, either to the backend or front, much the same as WordPress plugins. In fact, many plugins you use are nothing more than PHP snippets.

Searching for PHP snippets will yield quite a few sites such as WPSNIPP, featuring a large and useful collection for WordPress. Typically, what you do with these snippets is add them to your WordPress theme’s functions.php file. (Best practice – create a Child Theme and add them to the Child Theme’s functions.php file).

But, this method can get a bit overwhelming for some. Where to add in the file? What tags do I include? I added and now my whole site is down!

Enter the handy plugin by Shea Bunge; “Code Snippets”. Using this plugin negates the necessity to add snippets to your functions.php file – it does the work for you! You simply copy the snippet you wish to use then paste same into the “Add New Snippet” section of the plugin’s interface. Save your work, done – easy, and safe! You don’t need to worry about what tags to include or exclude, this plugin strips unnecessary front and back tags, formatting your snippet properly.

Have a look at how easy this is to use:

 

Both thumbs up for this plugin! Give it a try.

Share This