We recently looked at a plugin called <a title="Header and Footer Plugin Review" href="https:\/\/pagely.com\/blog\/safe-easy-way-add-code-wordpress-websites-header-footer\/" target="_blank" rel="noopener noreferrer">Header and Footer<\/a>. This free plugin gives you a safe and easy way to add code to those two areas of your WordPress website.\r\n\r\nWhile that is very useful, there is another plugin which can do a similar job. This time however, the <a title="Code Snippets plugin" href="https:\/\/wordpress.org\/plugins\/code-snippets\/" target="_blank" rel="noopener noreferrer">Code Snippets plugin<\/a> gives you <strong>a safe and easy way to add chunks of code<\/strong> to the <em><a title="What is the functions.php file?" href="https:\/\/codex.wordpress.org\/Functions_File_Explained" target="_blank" rel="noopener noreferrer">functions.php<\/a><\/em> file, that is part of your chosen WordPress theme.\r\n\r\nThe functions.php file contains lots of important information about how your WordPress website and current theme works. While adding your own custom code snippets to this file can help add new features, or modify the way your website works now, if you do something wrong, <strong>you could end up in trouble<\/strong>.\r\n\r\nAs well as giving you a way to reduce the risk of breaking your website, the Code Snippets plugin also gives you, and other admin users, a quick way to see what modifications have been made to this file. Using this plugin removes the need to work on the functions.php file directly, and therefore makes modifying your website a lot more straightforward, <strong>and a lot less risky<\/strong>.\r\n\r\nWordPress code snippets can be <a title="Code snippets website" href="https:\/\/www.wp-code.com\/" target="_blank" rel="noopener noreferrer">found all over the web<\/a>, as well as being something you may be able to create yourself. Editing the functions.php file, gives you a free and easy way to upgrade and modify the behaviour of your website. Now, by using this plugin you can take advantage of these code snippets, without compromising your website.\r\n<h2>How to Use the Code Snippets Plugin on Your Website<\/h2>\r\nAs the Code Snippets plugin is free to use, it can be installed on your site directly from the WordPress plugin directory.\r\n\r\nTo do so, log into your site's admin area (http:\/\/yoursite.com\/wp-login.php) and then navigate to Plugins > Add New using the sidebar menu.\r\n\r\nFrom the Add Plugins screen, enter \u2018Code Snippets' in the search field and then install the first item listed in the results.\r\n\r\n<img class="aligncenter size-full wp-image-6759" src="https:\/\/pagely.com\/wp-content\/uploads\/2015\/03\/Code-Snippets-Add-Plugin.png" alt="Add Code Snippets Plugin" width="945" height="406" \/>\r\n\r\nOnce the plugin has been installed and activated, the features of the plugin can be accessed from the newly added sidebar menu item.\r\n<h2>Safely Adding a Code Snippet to Your WordPress Website<\/h2>\r\nOnce you've found, or written a PHP code snippet, you can then create a new snippet through the Add New page of the plugin.\r\n\r\n<img class="aligncenter size-full wp-image-6760" src="https:\/\/pagely.com\/wp-content\/uploads\/2015\/03\/Code-Snippets-Add-New.png" alt="Add New Code Snippet" width="945" height="468" \/>\r\n\r\nAfter giving your snippet a name and adding the code, you can also write a description to <strong>help you remember the purpose of the code<\/strong>. This can also be useful to other users who are working on your site now, or in the future.\r\n\r\n<img class="aligncenter size-full wp-image-6761" src="https:\/\/pagely.com\/wp-content\/uploads\/2015\/03\/Code-Snippets-Description.png" alt="Code Snippets Description" width="945" height="482" \/>\r\n\r\nWhen your snippet is ready, you can then <strong>click the save and activate button to enable it<\/strong>. Alternatively, you can simply save it until it is ready to go live.\r\n\r\nYour code snippets can all be managed from the Mange screen of the plugin. This allows you to instantly see their status, and either activate or deactivate them.\r\n\r\n<img class="aligncenter size-full wp-image-6762" src="https:\/\/pagely.com\/wp-content\/uploads\/2015\/03\/Code-Snippets-Manage.png" alt="Manage Code Snippets " width="945" height="382" \/>\r\n\r\nOther features of this plugin allow you to <strong>import and export code snippets<\/strong>. This makes it very easy to share the snippets between WordPress websites. You also get access to some settings to control how the plugin works on your website.\r\n<h2>Conclusion<\/h2>\r\nIf you want to <strong>add code snippets to your WordPress website<\/strong>, either those you've written yourself or <a title="Code snippets website" href="https:\/\/www.isitwp.com\/" target="_blank" rel="noopener noreferrer">acquired from elsewhere<\/a>, then using this plugin is a safe option. Being able to easily see which snippets are active on your site, as well as having a way to add them without directly editing the functions.php file yourself, could save you a lot of problems down the road.\r\n\r\nIf you have any questions about this plugin, or working with WordPress in general, please leave a comment below.