wclv - introduction to child themes

25

Upload: vegasgeek

Post on 01-Sep-2014

2.213 views

Category:

Technology


1 download

DESCRIPTION

 

TRANSCRIPT

Page 1: WCLV - Introduction to child themes
Page 2: WCLV - Introduction to child themes

What the heck is a child theme?

“A WordPress child theme is a theme that inherits the functionality of another theme, called the parent theme, and allows you to modify, or add to, the functionality of that parent theme.”

- The WordPress Codex

Page 3: WCLV - Introduction to child themes

What can I use a child theme for?

• Customize the parent site design

• Add in additional functionality

• Save a bunch of time

Page 4: WCLV - Introduction to child themes

Why would I use a child theme?

• Update the parent theme without losing your customizations

• Did I mention the part about saving time?

Page 5: WCLV - Introduction to child themes

What do I need to get started?

• Choose a parent theme (check out twentyten & twentyeleven)

• A new folder in /wp-content/themes/

• A CSS file in your new theme

Page 6: WCLV - Introduction to child themes

The unedited parent theme

Page 7: WCLV - Introduction to child themes

Create a new theme folder

Page 8: WCLV - Introduction to child themes

Add a ‘style.css’ file

Page 9: WCLV - Introduction to child themes

Overriding style elements

Parent Theme Child Theme

Page 10: WCLV - Introduction to child themes

Activate your child theme

*screenshot.png

Page 11: WCLV - Introduction to child themes

Customized twentyeleven theme

Page 12: WCLV - Introduction to child themes

Twentyeleven header manager

Page 13: WCLV - Introduction to child themes

Overriding existing functions

Page 14: WCLV - Introduction to child themes

Overriding existing functions

Page 15: WCLV - Introduction to child themes

Overriding existing functions

Page 16: WCLV - Introduction to child themes

Adding your own functions

Page 17: WCLV - Introduction to child themes

Adding your own functions

Page 18: WCLV - Introduction to child themes

Keep in mind…

• Your child theme can contain as many or as few files as you want

• Files in your child theme folder override files in the parent theme folder

• Adding a functions.php will add-to rather than override functions.php from your parent theme

Page 19: WCLV - Introduction to child themes

Parent Theme vs Child Theme

Parent Theme Child Theme

Page 20: WCLV - Introduction to child themes

Overriding files

Page 21: WCLV - Introduction to child themes

Overriding files

Page 22: WCLV - Introduction to child themes

Overriding files

Page 23: WCLV - Introduction to child themes

Theme Frameworks

• Genesis – studiopress.com

• Thematic – themeshaper.com

• Hybrid – themehybrid.com

“A Theme framework is a Theme designed to be a flexible foundation for quicker WordPress development, usually serving as a robust Parent Theme for Child Themes.”

- The WordPress Codex

Page 24: WCLV - Introduction to child themes

Resources

• http://codex.wordpress.org/Theme_Development

• http://codex.wordpress.org/Child_Themes

• http://codex.wordpress.org/Plugin_API

Page 25: WCLV - Introduction to child themes