Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

April 2016 - Atlanta WordPress Users Group - Child Themes

231 views

Published on

A quick talk on the basics of Child Themes - what they are, how you start with them, and the value they add to development projects big and small.

Published in: Education
  • Be the first to comment

  • Be the first to like this

April 2016 - Atlanta WordPress Users Group - Child Themes

  1. 1. Child Themes THEMECEPTION - THEME SANITY
  2. 2. Body Level One
  3. 3. http://www.webbeh.com
  4. 4. Let’s Consider a Story. You’ve probably done this before…
  5. 5. *click*
  6. 6. Enter: Child Themes It’s all about inheritance.
  7. 7. • Purpose • Extend, customize, override an existing theme (parent theme) without editing any of the theme’s files. • To modify a theme while leaving the parent theme intact. Child Themes
  8. 8. • Parent theme can be updated without worry. • Goodbye, overwritten customizations! • Reuse the parent theme options across multiple sites! • Customize in child themes for site-specific tweaks. • Override, extend, or replace hooks and calls. Benefit?
  9. 9. Page Request Parent Theme Child Theme [insert magic here] Page Delivery
  10. 10. • 3 things needed to create a child theme. How to Create?
  11. 11. 1. A Folder
  12. 12. 2. style.css
  13. 13. 2. style.css
  14. 14. 2. style.css
  15. 15. 3. functions.php *
  16. 16. You’re Done!
  17. 17. • You created a subfolder in /wp-content/themes for your child theme. • You created a styles.css and populated it with the comment information for WordPress to identify it as a theme (with a parent). • You created a functions.php to store theme-specific PHP. What did you just do?
  18. 18. How does this help?
  19. 19. Page Request Parent Theme Child Theme [insert magic here] Page Delivery
  20. 20. Page Request Parent Theme Child Theme [insert magic here] Page Delivery Hooks Added Here Hooks Overridden Here
  21. 21. • You can write and include your own JS, CSS, and theme files. • You can write your own PHP functions.php settings for: • Customize the Customizer • Customize the theme display • Customize the widget areas • etc. • And you can write your own page templates! Features
  22. 22. • This is especially helpful if you have consistency on reusable components when building theme products. • Parent theme has all foundational components (widget areas, media queries, etc.) • Child theme(s) has the unique style and theme- specific functionality. Helpful for Frameworks
  23. 23. • This is especially helpful if you have consistency on reusable components when building theme products. • Parent theme has all foundational components (widget areas, media queries, etc.) • Child theme(s) has the unique style and theme- specific functionality. Helpful for Frameworks
  24. 24. How does this help?
  25. 25. How does this help?
  26. 26. How does this help?
  27. 27. How does this help?
  28. 28. Page… Templates?

×