If you want to create a new snippet, you select “Snippets” or “Code Snippets” in the WordPress admin and then just “Add New” or “Add”. Here’s how you add code snippets in the plugin Add a new snippet. It has never been so easy to manage and maintain a large number of snippets within WordPress in a meaningful way. So, in my opinion, the biggest strength of Code Snippets is the management itself, which is very keen to ensure a good overview at all times.
This is, compared to other plugins, which often only work as a simple collection, very well thought out and sensibly solved. Moreover, it is possible to import or export the snippets, clone them or remove them again. The code snippets themselves can be switched on and off. In the overview, PHP, HTML, CSS and JavaScript are also marked in different colors, so that here again enough clarity is provided. In this, notes or explanations can also be deposited and tags are also still there. The individual snippets also receive a meaningful name in the Code Snippets plugin, as well as a small text to describe the function itself. Pretty handy because everything you add yourself is now available in the Snippet Editor and can be managed there in a well thought-out and clear way. This includes HTML, CSS and JavaScript code. What the Code Snippets plugin for WordPress is all aboutĬode Snippets is now not only for functions.php, but takes care of all specially added lines of code.
Nevertheless, the administration is of course a bit more complicated and you keep the overview in the functions.php only with appropriate comments in the code itself. This is done so that the snippets persist and the theme doesn’t overwrite everything during an update. In the actual use of the code snippets, there is then the idea, as for actually all changes to the theme, to add them only via a child theme. But it is generally used for small code snippets. Theoretically, you can fill the functions.php with extensive code because there is no real limit.
The Code Snippets Pro Editorīasically, the snippets are simply PHP code and are always used when no extra plugin should be developed or installed. Such snippets can be cosmetic, for example to hide the admin bar in the WordPress backend, or for practical purposes to change all file names to lowercase when uploading. Through functions.php, you usually add smaller functions that don’t necessarily require a separate plugin. WordPress Code Snippets are PHP snippets, which are small fragments of code meant for functions.php in your WordPress theme. Don’t worry, this thing is basically quite simple. After all, I can’t just expect you to already know what exactly WordPress Code Snippets are and how they might help you and your blog. Now, before I take a look at the WordPress plugin itself, I’d like to start by briefly clarifying what the Code Snippets are all about. What exactly are WordPress code snippets? Why I can't recommend Code Snippets to everyone.The pricing of the plugin is the problem for me.A comparison with the theoretical competition.Select individual settings in the Code Snippets plugin.Here's how you add code snippets in the plugin.What the Code Snippets plugin for WordPress is all about.What exactly are WordPress code snippets?.