Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up
for free
WooCommerce Theme Development Workshop
Zac Gordon
April 08, 2016
Technology
1
1.8k
WooCommerce Theme Development Workshop
For WooConf 2016 - Austin
Zac Gordon
April 08, 2016
Tweet
Share
More Decks by Zac Gordon
See All by Zac Gordon
zgordon
0
110
zgordon
0
110
zgordon
0
370
zgordon
0
190
zgordon
0
550
zgordon
0
100
zgordon
0
600
zgordon
0
44
zgordon
0
230
Other Decks in Technology
See All in Technology
ymas0315
0
120
hecateball
1
12k
viva_tweet_x
4
2.5k
shimacos
2
290
minamizaki
0
530
kanaugust
PRO
0
210
takem001
0
870
shirayanagiryuji
0
1.5k
shirayanagiryuji
1
400
yuhta28
1
200
ytaka23
0
430
line_developers
PRO
0
140
Featured
See All Featured
eitanlees
111
9.9k
myddelton
109
11k
pedronauck
652
110k
colly
66
3k
aarron
258
36k
geoffreycrofte
18
770
mthomps
39
2.3k
scottboms
251
11k
holman
461
280k
lauravandoore
11
1.2k
holman
448
130k
michaelherold
225
8.4k
Transcript
WooCommerce Theme Development Zac Gordon | wp.zacgordon.com | @zgordon
What We Will Cover - Add WC Theme Support -
WC Template Hierarchy - Overriding Templates - Updating Templates - Template Functions - Theme Hooks
Recommended Prereqs For WC Theme Developers - Ability to setup
and use WC - Child Themes - WP Template Hierarchy - WP Hooks - HTML, CSS, JS, PHP
About This Workshop And My Interest in It - Based
on Treehouse Course - Released for WooConf 2015 - Why I Love Woo!
add_theme_support( 'woocommerce' );
Just like WP, WC is built on a structured template
system.
WC Template Files in WP
WC on Github https://github.com/woothemes/woocommerce/tree/master/templates
Overriding Templates https://docs.woothemes.com/document/template-structure/ - Works just like Child Themes -
Create a “woocommerce” folder in your theme folder - Copy over only the files you need - Keep the same structure as the plugin “template” folder
Practice: Let’s Play! Add a “woocommerce” folder to any theme
and start customizing templates
Updating Templates https://docs.woothemes.com/document/fix-outdated-templates-woocommerce/ https://docs.woothemes.com/document/template-structure/ - WC templates do get updated
- May have to update your template files - Admin > WooCommerce > System Status
Template Functions https://docs.woothemes.com/document/introduction-to-hooks-actions-and-filters/ - Load other templates - Conditional tests
- Get & Set WC content - wc-template-functions.php
Practice: Let’s Explore! Explore the functionality and source code of
the different template functions available in WC.
WC Hooks: Actions & Filters https://docs.woothemes.com/document/introduction-to-hooks-actions-and-filters/ https://docs.woothemes.com/wc-apidocs/hook-docs.html - Preferred way
for many modifications - Actions let us add code - Filters let us modify content - functions.php - Wc-template-hooks.php - Query Monitor / Hookr.io - Find Where
Practice: Hooking it Up Practice using actions and filters to
move around and modify code. Suggestion - try the Cart & Checkout
Learn More Take the course for free!!! - wp.zacgordon.com -
Look for WP Courses - WC Theme Development - Sign Up through Treehouse