by Charles S. Mombo
It would be remiss of me not to acknowledge the outstanding community of WordPress volunteers, supporters and users who have already solved many of the toughest challenges by providing the world's most powerful and FREE web publishing software.
What is WordPress?
Unlike what most people think, WordPress is not only used to create beautiful blogs. It is also used to create outstanding websites.
According to WordPress' website, “At the core of WordPress is a dumb-simple interface similar to the desktop publishing software you use today. With no coding experience or expert knowledge necessary, the learning curve is often about as short as typing in your site’s URL and logging in. In fact, most users are able to pick up the basics without any training at all. Interfaces are polished and easy to use, and are the result of years of refinement. It’s the power of Microsoft Word with the intuitiveness of an iPhone.”
The foundation or cornerstone of WordPress is centered around or driven by plugins and themes.
Plugins are widget-like tools designed by the general community of WordPress' volunteers, supporters and users to extend the functionality of the base application – WordPress. Thanks to plugins, no two WordPress websites or blogs have to look the same. Plugins allow users to customize their respective websites as they choose. WordPress plugin directory has about 24,000 free plugins.
Themes are basically the same as templates; or, cover pages with nicely styled or formatted tables – Cascading Style Sheets (CSS). For a very basic and elementary definition, CSS is a style sheet language that beautifully formats the look of your website. WordPress' theme directory has about 1,700 free themes. Many websites online sell or customize templates.
WordPress’ theme folder is located in wp-content/themes directory and the plugins are located in wp-content/plugins directory.
What is a WordPress Child-Theme?
A WordPress child-theme is a theme that inherits the functionality and characteristics of the main or parent theme. Child-theme is used when you want to customize or modify your theme/ template files beyond just the CSS. It is used to prevent you from mistakenly overwriting any changes you might have made prior to a newer version of the theme. In essence, a child-theme is very necessary. It definitely helps in preventing disaster especially with a customer’s website that you might have customized. For this and other reasons, child themes are the recommended way of making modifications to a theme. Again, upgrade to the theme will not override changes made prior to a new version of the theme.
Directory Structure of a Child-Theme
Assuming that “Mombo,” is the name of your parent theme, the child-theme should be in the following format – “Mombo-child”. Both “Mombo” and “Mombo-child” must be located in wp-content/themes/Mombo and wp-content/themes/Mombo-child respectively. wp-content/themes/Mombo-child/style.css must at least contain @import url("../mombo/style.css"). Additionally, one could add only the portion of the style.css that was modified into the child-theme.
Instead of reinventing the wheel, I have added the directory structure from WordPress’ website. Within the below example, WordPress uses Twenty Twelve – the default theme WordPress 3.5.
A child theme resides in its own directory in wp-content/themes. The scheme below shows the location of a child theme along with its parent theme (Twenty Twelve) in a typical WordPress directory structure:
- site_root (www)
- themes (directory where all themes are)
- twentytwelve (directory of parent theme, Twenty Twelve)
- twentytwelve-child (directory of our child theme)
- style.css (required file in a child theme; must be named style.css)
- themes (directory where all themes are)
This directory can contain as little as a style.css file, and as much as any full-fledged WordPress theme contains:
1. style.css (required)
2. functions.php (optional)
3. Template files (optional)
4. Other files (optional)
About the Author:
Charles Mombo worked at Computer Associates, Inc. as a Software Quality Engineer for seven years, Böwe Bell & Howell, for seven years as a Technical Support Analyst with their ACF2/MVS mainframe security product line.
He has an assorted background in LAMP (Linux, Apache, MySQL and PHP) and Operating Systems such as UNIX, Linux Red Hat, MVS, Windows, MVS/XA, and MVS/ESA.
He holds a Bachelor of Science degree in Computer Science; a Master of Science degree in Management Information Systems (MSMIS), and a Master degree in Business Administration (MBA). As an Adjunct Professor, he teaches Computer Science and Business at couple of colleges.
As the director of monetization and product marketing, Charles front-ends WordPress with open source applications on most of the 170 websites own by wwclick.com. wwclick.com, Inc. is a marketing strategy, search engine optimization (SEO) and social media consulting firm founded by him.