Every now and then we get an email from one of our users explaining how they broke their WordPress site while trying to add some code to their functions.php file. It was for this reason that we wrote a tutorial on how to paste code properly in WordPress. Furthermore, if the code you are pasting is something that you intend to be theme independent then we would even suggest using a site specific plugin.
Some of you reading this, however, are probably not very confident in your ability to create a site specific plugin without breaking your WordPress blog. If this is you then you have come to the right place. Recently @otto42 came out with a unique plugin called Pluginception that actually allows you to create your own plugins. If any of you have ever seen the movie Inception with Leonardo DiCaprio then you will recognize the inspiration for the plugin’s name. In the movie Leonardo essentially enters people’s dreams and creates more dreams within those dreams (confusing right?). Well, in a similar fashion this plugin allows you to create plugins within a plugin.
To get started coding your first plugin you need to download and install Pluginception for WordPress,
Once you have installed the plugin click on Plugins » Create a New Plugin. This will bring you to a screen where you can input all of your plugin information. The only line you must fill out is the plugin name although the other information would be good to have as well.
Once you fill out all of the information and create your plugin you will be brought the editor screen where you can add any code you want.
The advantage of adding plugins this way is that you don’t have to worry about breaking your WordPress site when you accidentally mess up your code. Rather than causing you site not to load properly, the plugin will simply not activate and give you a warning in the backend.
Download Pluginception for WordPress