Daughter Themes        (aka: Child-Themes)And why you need to know about them
Why AndHo
No theme will fit all sites
You can’t apply an update to atheme without losing yourchanges
Creating whole themes is hard
Daughter themes are easy
You can use framework themes        to save effort
You can brand a theme for your client
The code needed/*Theme Name: You Company Theme.Theme URI: http://bearne.caAuthor: Paul BearneTemplate: twentyelevenAuthor ...
How to install it Save as style.css In a new folder called "theme-name" ... for example:  " YourCompanyTheme" Create a ...
Or FTP it Upload it to the Themes folder in a new folder which follows to show the theme folder as: YourCompanyTheme
Add a thumbnail Upload an image screenshot.png
Replacing template files Copy just the files from parent theme that you  need to change to you daughter folder and edit  ...
functions.php WordPress will load BOTH function.php files   child function.php then the parent function.php So you only ...
Notes You can’t have a child of a child (1 layer only) There is a very small performance hit
Some links http://codex.wordpress.org/Child_Themes http://themeshaper.com/modify-wordpress-  themes/ http://wpfirstaid....
Daughter Themes
Daughter Themes
Upcoming SlideShare
Loading in...5
×

Daughter Themes

1,556

Published on

Sooner or later the theme you are using will need that little change to make just right for you. Learn how to create a child theme so that your personal changes won’t be overwitten by a theme update. present at The 2011 Toronto WordCamp http://2011.toronto.wordcamp.org/

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,556
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
7
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • there are always that little tweaks that will make jut right for you.
  • If you edit the main theme, you will lose the edits if you update the theme following a version release
  • there are always that little tweaks that will make jut right for you.
  • there are always that little tweaks that will make jut right for you.
  • there are always that little tweaks that will make jut right for you.
  • Daughter Themes

    1. 1. Daughter Themes (aka: Child-Themes)And why you need to know about them
    2. 2. Why AndHo
    3. 3. No theme will fit all sites
    4. 4. You can’t apply an update to atheme without losing yourchanges
    5. 5. Creating whole themes is hard
    6. 6. Daughter themes are easy
    7. 7. You can use framework themes to save effort
    8. 8. You can brand a theme for your client
    9. 9. The code needed/*Theme Name: You Company Theme.Theme URI: http://bearne.caAuthor: Paul BearneTemplate: twentyelevenAuthor URI: http://bearne.ca/Description: This is the special theme I created just for your company’swebsite.Version: 1.0License: GNU General Public LicenseLicense URI: license.txtTags: dark, light, white, black, gray, one-column, two-columns, left-sidebar, right-sidebar, fixed-width, flexible-width, custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-image-header, featured-images, full-width-template, microformats, post-formats, rtl-language-support, sticky-post, theme-options, translation-ready*/@import url(../twentyeleven/style.css);
    10. 10. How to install it Save as style.css In a new folder called "theme-name" ... for example: " YourCompanyTheme" Create a zip of the folder - newTheme.zip (this zip needs a subfolder with the style.css in it ) Upload it
    11. 11. Or FTP it Upload it to the Themes folder in a new folder which follows to show the theme folder as: YourCompanyTheme
    12. 12. Add a thumbnail Upload an image screenshot.png
    13. 13. Replacing template files Copy just the files from parent theme that you need to change to you daughter folder and edit them. WordPress looks in the daughter folder first and loads the file if found
    14. 14. functions.php WordPress will load BOTH function.php files child function.php then the parent function.php So you only need to add the extra/replacement functions Example:<?phpadd_action( after_setup_theme, CompanyNameTheme_setup );if ( ! function_exists( CompanyNameTheme_setup ) ):/** * Sets up theme defaults and registers support for various WordPress features. */function CompanyNameTheme_setup() { // The default header text color define( HEADER_TEXTCOLOR, fff ); // By leaving empty, we allow for random image rotation. define( HEADER_IMAGE, );}endif; // CompanyNameTheme setup
    15. 15. Notes You can’t have a child of a child (1 layer only) There is a very small performance hit
    16. 16. Some links http://codex.wordpress.org/Child_Themes http://themeshaper.com/modify-wordpress- themes/ http://wpfirstaid.com/2011/04/wordpress-child- themes/ http://themeshaper.com/modify-wordpress- themes/ @pbearne
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×