A child theme is essentially a simple style.css file containing this information:
/* Theme Name: Mystique - Extend Theme URI: http://digitalnature.eu/themes/mystique/ Description: Child theme of Mystique. Please leave this one activated for proper customizations to Mystique. Version: 1.0 Author: You & digitalnature Author URI: http://digitalnature.eu/ Template: mystique */ /* Add your own CSS here if you want */
The most important thing here is the line with the Template: tag. The value you enter there tells WordPress to use template files from that theme directory (“mystique” in this case) if your child theme directory doesn’t have them.
So to build your child theme, create a directory in wp-content/themes, name it as you wish and drop this style.css file in it. Then activate the theme. That’s it.
The main advantage is that you can safely customize the theme you selected above, without loosing the changes you make in case you upgrade WP or the theme to a newer version. Also, when your site uses a child Atom theme, you get some extra features enabled
Let’s say you want to change what appears in post teasers, for example – you want to add the post view count in the information bar:
The post teaser (preview) template is named teaser.php. Locate this file in the main theme directory, and copy it to your computer.
Open it in a text editor, preferably one with code syntax highlighting, like Notepad2, and simply add the code that shows the post counts somewhere in the .post-std div. Luckily Atom has a getViews() method implemented, so you don’t need to code this feature yourself:
This post has <?php echo $app->post->getViews(); ?> views
Save the file and upload it in your child theme directory. Now WordPress will use your custom teaser.php template when showing post teasers on the home page.
Already have a “Extend” theme active ?
Atom themes will attempt to automatically create and activate a child theme when first installed. This is not always successful since many hosts prevent direct write access for scripts, but in case you already have it running, then you don’t need to manually create one anymore.
Child Themes (The WordPress Codex)
Comments are currently deactivated