Creating a Child Theme in WordPress
description
Transcript of Creating a Child Theme in WordPress
CHILD THEMES IN WORDPRESSAMY M. YOUNG
Who am I?
Photographer (http://www.wildgirlproductions.com)Author (http://www.torrent-band.com)Occasional developerCo-Owner of Alternative Hosting
What is a child theme?A theme that inherits functionality from another WordPress theme (the parent theme). In theory any theme can be a parent theme
in practice - not all themes will workGood parent theme examples - Genesis/Thesis
Why should I create a child theme?
Hacking the main theme means it can’t be updated without losing changes
security risk!Speed up development
When should I use a child theme?
adding new functions to the functions.phptweaking css
What do I need to create a child theme?
A Parent ThemeA Basic Text Editor (i.e. - Notepad, TextWrangler)An FTP Client (FileZilla, CyberDuck)
CREATION OF A CHILD THEME FOLDERDAVID IS A CHILD THEME OF TWENTY FOURTEEN
THE MOST IMPORTANT FILE!
THE BASIC REQUIREMENTSSTYLE.CSS
BASIC LAYOUTSTYLE.CSS
CALL THE PARENT THEME CSS!
Child Theme or Theme Modification Plugin?
TimeAbilitySupport for the pluginStill good practice to use a child theme
When to modify Functions.php
To augment or replace the parent theme's functions.Beware: if a WordPress Plugin calls the same function, or filter, as you do in your functions file, the results can be unexpected, site disabling. For the most part you want to use plugins to do this
plugins will generally give the same result but across all themes
WHAT DOES FUNCTIONS.PHP LOOK LIKE?