Lately, I built quite a bit in WordPress project using custom theme. And I encountered some problems and I found solution when facing them.
First problem is whether I should use Custom Theme to act as a child theme to load everything including style and functions from any existing themes like Twenty-Eleven theme. After getting more experience with WordPress development, I start to prefer to use individual custom theme without loading any parent themes. In this way, it will produce the theme in clean coding. And any styling from parent (existing) theme will not generate any conflict with my own CSS. I remember that I had a bad time to write more CSS styling code to just re-define some element styling.
Secondly, with individual theme installation, I will not need to worry about some unwanted functions defined in existing themes will be loaded in the website. In the individual custom theme, it will make sure that only needed and required functions will be running through the site. Thus, the website with individual theme will be loaded and rendered much faster. And it is also good coding practice to learn some handy functions and coding style from existing theme and do copy-and-paste in order to save more development time and learn more about WordPress development.
I also encountered a problem where I successfully generated a clean individual start-up theme but the widget and menu option in the “Appearance” in the back-end is gone. And after some study and discovery in existing theme in “Twenty-Eleven”, I found out that there is some pre-loaded functions will be set after theme activation. And some of them are to set up widget and menu option in the WordPress back-end. Once I have them copied over to my own theme and re-activate my theme, I found everything worded fine.
In my individual theme, I would also like to include the custom post type function to allow users to create custom post-type post in the WordPress back-end. For example, users can create any post about product, news or events based on how they would like to categorize their content.
In this post, I will also share my zipped individual theme which I will use to create new WordPress projects. It will be improved over time.
Here is the download link.