Creating a Child Theme in WordPress

15
CHILD THEMES IN WORDPRESS AMY M. YOUNG

description

The basics of creating a child theme in WordPress and best practices

Transcript of Creating a Child Theme in WordPress

Page 1: Creating a Child Theme in WordPress

CHILD THEMES IN WORDPRESSAMY M. YOUNG

Page 2: Creating a Child Theme in WordPress

Who am I?

Photographer (http://www.wildgirlproductions.com)Author (http://www.torrent-band.com)Occasional developerCo-Owner of Alternative Hosting

Page 3: Creating a Child Theme in WordPress

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

Page 4: Creating a Child Theme in WordPress

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

Page 5: Creating a Child Theme in WordPress

When should I use a child theme?

adding new functions to the functions.phptweaking css

Page 6: Creating a Child Theme in WordPress

What do I need to create a child theme?

A Parent ThemeA Basic Text Editor (i.e. - Notepad, TextWrangler)An FTP Client (FileZilla, CyberDuck)

Page 7: Creating a Child Theme in WordPress

CREATION OF A CHILD THEME FOLDERDAVID IS A CHILD THEME OF TWENTY FOURTEEN

Page 8: Creating a Child Theme in WordPress

THE MOST IMPORTANT FILE!

Page 9: Creating a Child Theme in WordPress

THE BASIC REQUIREMENTSSTYLE.CSS

Page 10: Creating a Child Theme in WordPress

BASIC LAYOUTSTYLE.CSS

Page 11: Creating a Child Theme in WordPress

CALL THE PARENT THEME CSS!

Page 12: Creating a Child Theme in WordPress

Child Theme or Theme Modification Plugin?

TimeAbilitySupport for the pluginStill good practice to use a child theme

Page 13: Creating a Child Theme in WordPress

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

Page 14: Creating a Child Theme in WordPress

WHAT DOES FUNCTIONS.PHP LOOK LIKE?

Page 15: Creating a Child Theme in WordPress

QUESTIONS?

Twitter: @amymyoungwebsite: http://www.amymyoung.com

email: [email protected]