Your SlideShare is downloading. ×
0
Meetup child-themes
Meetup child-themes
Meetup child-themes
Meetup child-themes
Meetup child-themes
Meetup child-themes
Meetup child-themes
Meetup child-themes
Meetup child-themes
Meetup child-themes
Meetup child-themes
Meetup child-themes
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Meetup child-themes

2,856

Published on

Presentation for Westchester/Hudson Valley WordPress Meetup - September 29, 2010

Presentation for Westchester/Hudson Valley WordPress Meetup - September 29, 2010

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,856
On Slideshare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
11
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Child Themes Daisy Olsen http://daisyolsen.com
  • 2. What is a Child Theme <ul><li>Installed and activated like any other theme
  • 3. Dependent on a parent theme for elements not found in the child theme
  • 4. Only style.css is required
  • 5. Can be used to re-skin a theme
  • 6. Can add functionality
  • 7. Can over-ride parts of the parent theme </li></ul>
  • 8. Why Use a Child Theme <ul><li>Future-proof your customizations
  • 9. Rapid development
  • 10. Build upon a consistent codebase
  • 11. Understanding of PHP and WordPress themeing is helpful but not required for basic child themes </li></ul>
  • 12. Child Theme Files <ul><li>WordPress template hierarchy
  • 13. style.css – Only Child theme file is used.
  • 14. functions.php – Both parent and child files always run.
  • 15. Other files – Child theme checked first then Parent theme. First file found runs. Specific -> General </li></ul>
  • 16. Making a Child Theme <ul><li>Get to Know your Parent Theme
  • 17. Create style.css
  • 18. Page Templates
  • 19. Overriding Parent Theme Files
  • 20. Demo site : http://wpthemedemos.com </li></ul>
  • 21. Required in style.css /* Theme Name: Twenty Ten Child Demo Description: A Child Theme for Twenty Ten for Demonstration. Theme URI: http://daisyolsen.com Author: Daisy Olsen Author URI: http://daisyolsen.com Template: twentyten Version: 1.0 */
  • 22. style.css <ul><li>Option #1 – import style.css from parent theme @import url('../twentyten/style.css');
  • 23. Option #2 – Copy/Paste entire style.css from parent theme into child theme style.css
  • 24. Option #3 – Build new style.css from scratch </li></ul>
  • 25. Hooks <ul><li>Twenty Ten has one hook built in for adding additional content. WordPress also includes some hooks that can be used. </li></ul>do_action( 'twentyten_credits' ); <ul><li>Think of a hook as an insertion point. </li></ul>add_action('twentyten_credits', 'my_credits'); function my_credits() { echo 'This is my credit line using a function'; }
  • 26. Replace Theme Template Files <ul><li>Our Demo Child theme replaces the footer.php file with a customized version which changes the default footer credits with customized ones.
  • 27. If a template file exists in the child theme the parent theme file is ignored. </li></ul>
  • 28. Template Parts <ul><li>New to WordPress 3.0
  • 29. Twenty Ten allows you to modify the loop by creating a new file in the child theme with a modified version of loop.php
  • 30. We will modify the way the category archive displays with loop-category.php </li></ul>
  • 31. Theme Frameworks <ul><li>Built with the intention of being modified via child theme
  • 32. Extensive Action/Filter Capabilities
  • 33. Active Development
  • 34. Popular Parent/Child Frameworks </li><ul><li>Hybrid
  • 35. Thematic
  • 36. Genesis (Commercial) - StudioPress
  • 37. Builder (Commercial) - iThemes </li></ul></ul>
  • 38. Resources <ul><li>Codex: Child Themes
  • 39. Aaron Jorbin's Guide
  • 40. Understanding Child Themes
  • 41. Modify WordPress Themes The Smart Way </li></ul>

×