24/7 U.S. Support – 877-595-4482
Child themes are essential to anyone who wants to modify a WordPress theme. If you do not create a Child Theme and instead modify the original theme, any future updates to that theme could completely overwrite your edits. Fortunately, creating a Child Theme is not overly difficult and is extremely flexible. You can keep things as simple as adding CSS to your Child Theme's style sheet or as advanced as adding templates or functions your Child Theme. In this example we'll keep it simple with some basic CSS changes to customize the look of our Site Title and Site Description.
In this example, we'll be inserting the following code into the style.css file:
/*
Theme Name: Christi's Theme
Description: Christi's child theme for the twentyeleven theme
Author: ChristiN
Template: twentyeleven
*/
@import url("../twentyeleven/style.css");
Let's look at this line by line to fully understand what this does. (Note that /* and */ are simply opening and closing tags for the information header)
| Theme Name: | The "friendly" name for your theme. This is what you will see displayed for your Child Theme when viewing your list of themes in your WordPress dashboard inside Themes > Appearance. |
|---|---|
| Description: | Short description of your theme (optional). |
| Author: | Your name. (Yes, this is optional, but why not give yourself credit?) |
| Template: | This specifies the Parent Theme (the directory name of the theme that your Child Theme uses templates from) |
| @import url: | This imports in the Parent Theme's style sheet. Adjust as needed to reference the correct Parent Theme style sheet.
Please note, if your Child Theme needs to support Right-to-left languages, be sure to import the RTL style sheet. For example: @import url("../twentyeleven/rtl.css");) |
#site-title,
#site-description {
font-family: Georgia, "Times New Roman", Times, serif;
font-weight:bold;
text-align:center;
margin:10px auto;
color: #e56c07
}
#site-title a {
color: #0c8fbe
}
Here's the updated site with the new styles in action:
There are many things you can do with a Child Theme. If you would like to go further in depth with Child Themes, please see the WordPress Codex on Child Themes.
| Email: | support@WebHostingHub.com | Ticket: | Submit a Support Ticket |
|---|---|---|---|
| Call: |
877-595-4HUB (4482) 757-416-6627 (Intl.) |
Chat: | Click To Chat Now |
Copyright © 2013 Web Hosting Hub - Privacy Policy - Terms of Service