Came across an odd problem this week. Typically, I create a wordpress child theme for my sites, in fact, I always do.
As you may be aware, child themes are implemented by creating a directory in /wp-content/themes and adding a style.css file to it with information about the child theme at the top of the file (more info here).
I always like to customize the login page for clients, as it’s more professional and personalized. A quick and easy way to do that is to create a functions.php file in the child theme directory and add a little bit of code to that file.
Following the same procedure I’ve used literally hundreds and hundreds of times, the custom login code wasn’t working. I could get the style.css code to work, to some degree, but even that was wonky and inconsistent. I tried multiple different variations of the code, after scouring stackexchange and other sites, and nothing worked.
Finally, one such forum suggested using the Pluginception plugin.
This beautiful, simple and effective little script enables you the ability to quickly and easily create new plugins on your WordPress installation.
Once it’s installed, you click on “Create a New Plugin”, and you are presented with a number of fields. Only one, Plugin Name, is required, but I recommend filling in Plugin Slug and Description as well. The rest are up to you. To finish, click on “Create a blank plugin and activate it!“.
From there, I copied and pasted the custom login page code from the functions.php file into the blank plugin, activated it, and voilà, it works.
I did the same for a couple other customizations, and they work beautifully. Another plus is that, customizations via the functions.php file do not work if you change themes, but plugins do.
Thank you Samuel Wood (Otto), for developing such a cool and useful plugin.