making static sites dynamic (with wordpress yo!)
TRANSCRIPT
![Page 1: Making static sites dynamic (with WordPress yo!)](https://reader031.vdocument.in/reader031/viewer/2022022415/5a648efb7f8b9a5d568b4bb3/html5/thumbnails/1.jpg)
Making static sites dynamic (with WordPress yo!)
Anthony Montalbano • 05.31.2017
![Page 2: Making static sites dynamic (with WordPress yo!)](https://reader031.vdocument.in/reader031/viewer/2022022415/5a648efb7f8b9a5d568b4bb3/html5/thumbnails/2.jpg)
Anthony Montalbano
Stuff I did
● Cofounded AMBR Detroit
● WordPress dev for 10 years
● Sold millions of pizza on the internet
Stuff to contact me
● @italianst4
![Page 3: Making static sites dynamic (with WordPress yo!)](https://reader031.vdocument.in/reader031/viewer/2022022415/5a648efb7f8b9a5d568b4bb3/html5/thumbnails/3.jpg)
![Page 4: Making static sites dynamic (with WordPress yo!)](https://reader031.vdocument.in/reader031/viewer/2022022415/5a648efb7f8b9a5d568b4bb3/html5/thumbnails/4.jpg)
How WordPress does template files
Headers, footers & menus (oh my!)
Scripts and styles (the right way)
The Loop
Template Parts
Overview
![Page 5: Making static sites dynamic (with WordPress yo!)](https://reader031.vdocument.in/reader031/viewer/2022022415/5a648efb7f8b9a5d568b4bb3/html5/thumbnails/5.jpg)
How WordPress does template files
![Page 6: Making static sites dynamic (with WordPress yo!)](https://reader031.vdocument.in/reader031/viewer/2022022415/5a648efb7f8b9a5d568b4bb3/html5/thumbnails/6.jpg)
(some folder where WordPress is installed)
● /wp-content/
○ /themes/
■ /some_theme_name/
Contents of a WordPress theme
![Page 7: Making static sites dynamic (with WordPress yo!)](https://reader031.vdocument.in/reader031/viewer/2022022415/5a648efb7f8b9a5d568b4bb3/html5/thumbnails/7.jpg)
/wp-content/themes/some_theme_name/
● style.css
Contents of a WordPress theme
![Page 8: Making static sites dynamic (with WordPress yo!)](https://reader031.vdocument.in/reader031/viewer/2022022415/5a648efb7f8b9a5d568b4bb3/html5/thumbnails/8.jpg)
/*
Theme Name: Custom Theme Name
Theme URI: https://ambrdetroit.com
Description: A custom theme for AMBR
Version: 1.0.0
Author: AMBR Detroit
Author URI: http://ambrdetroit.com
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ambrdetroit
*/
Inside the style.css
![Page 9: Making static sites dynamic (with WordPress yo!)](https://reader031.vdocument.in/reader031/viewer/2022022415/5a648efb7f8b9a5d568b4bb3/html5/thumbnails/9.jpg)
Oh hey, you got a new theme!
![Page 10: Making static sites dynamic (with WordPress yo!)](https://reader031.vdocument.in/reader031/viewer/2022022415/5a648efb7f8b9a5d568b4bb3/html5/thumbnails/10.jpg)
Oh hey, you got a new theme!
Include a screenshot.png in your theme folder.(1200 x 900)
![Page 11: Making static sites dynamic (with WordPress yo!)](https://reader031.vdocument.in/reader031/viewer/2022022415/5a648efb7f8b9a5d568b4bb3/html5/thumbnails/11.jpg)
/wp-content/themes/some_theme_name/
● style.css
● screenshot.png
Contents of a WordPress theme
![Page 12: Making static sites dynamic (with WordPress yo!)](https://reader031.vdocument.in/reader031/viewer/2022022415/5a648efb7f8b9a5d568b4bb3/html5/thumbnails/12.jpg)
WordPress Template Hierarchy
![Page 13: Making static sites dynamic (with WordPress yo!)](https://reader031.vdocument.in/reader031/viewer/2022022415/5a648efb7f8b9a5d568b4bb3/html5/thumbnails/13.jpg)
/wp-content/themes/some_theme_name/
● style.css *
● screenshot.png
● index.php *
Contents of a WordPress theme
![Page 14: Making static sites dynamic (with WordPress yo!)](https://reader031.vdocument.in/reader031/viewer/2022022415/5a648efb7f8b9a5d568b4bb3/html5/thumbnails/14.jpg)
Inside the index.php
![Page 15: Making static sites dynamic (with WordPress yo!)](https://reader031.vdocument.in/reader031/viewer/2022022415/5a648efb7f8b9a5d568b4bb3/html5/thumbnails/15.jpg)
Headers, footers and menus (oh my!)
![Page 16: Making static sites dynamic (with WordPress yo!)](https://reader031.vdocument.in/reader031/viewer/2022022415/5a648efb7f8b9a5d568b4bb3/html5/thumbnails/16.jpg)
/wp-content/themes/some_theme_name/
● style.css *
● screenshot.png
● index.php *
● header.php
Contents of a WordPress theme
![Page 17: Making static sites dynamic (with WordPress yo!)](https://reader031.vdocument.in/reader031/viewer/2022022415/5a648efb7f8b9a5d568b4bb3/html5/thumbnails/17.jpg)
Inside the index.php
![Page 18: Making static sites dynamic (with WordPress yo!)](https://reader031.vdocument.in/reader031/viewer/2022022415/5a648efb7f8b9a5d568b4bb3/html5/thumbnails/18.jpg)
Inside the header.php
![Page 19: Making static sites dynamic (with WordPress yo!)](https://reader031.vdocument.in/reader031/viewer/2022022415/5a648efb7f8b9a5d568b4bb3/html5/thumbnails/19.jpg)
Inside the index.php (with header)
![Page 20: Making static sites dynamic (with WordPress yo!)](https://reader031.vdocument.in/reader031/viewer/2022022415/5a648efb7f8b9a5d568b4bb3/html5/thumbnails/20.jpg)
/wp-content/themes/some_theme_name/
● style.css *
● screenshot.png
● index.php *
● header.php
● footer.php
Contents of a WordPress theme
![Page 21: Making static sites dynamic (with WordPress yo!)](https://reader031.vdocument.in/reader031/viewer/2022022415/5a648efb7f8b9a5d568b4bb3/html5/thumbnails/21.jpg)
Inside the index.php
![Page 22: Making static sites dynamic (with WordPress yo!)](https://reader031.vdocument.in/reader031/viewer/2022022415/5a648efb7f8b9a5d568b4bb3/html5/thumbnails/22.jpg)
Inside the footer.php
![Page 23: Making static sites dynamic (with WordPress yo!)](https://reader031.vdocument.in/reader031/viewer/2022022415/5a648efb7f8b9a5d568b4bb3/html5/thumbnails/23.jpg)
Inside the index.php (with header and footer)
![Page 24: Making static sites dynamic (with WordPress yo!)](https://reader031.vdocument.in/reader031/viewer/2022022415/5a648efb7f8b9a5d568b4bb3/html5/thumbnails/24.jpg)
Loads: header-homepage.php
Loads: footer-about.php
Protip: Headers and Footers
![Page 25: Making static sites dynamic (with WordPress yo!)](https://reader031.vdocument.in/reader031/viewer/2022022415/5a648efb7f8b9a5d568b4bb3/html5/thumbnails/25.jpg)
/wp-content/themes/some_theme_name/
● style.css *
● screenshot.png
● index.php *
● header.php
● footer.php
● functions.php
Contents of a WordPress theme
![Page 26: Making static sites dynamic (with WordPress yo!)](https://reader031.vdocument.in/reader031/viewer/2022022415/5a648efb7f8b9a5d568b4bb3/html5/thumbnails/26.jpg)
Inside the functions.php
![Page 27: Making static sites dynamic (with WordPress yo!)](https://reader031.vdocument.in/reader031/viewer/2022022415/5a648efb7f8b9a5d568b4bb3/html5/thumbnails/27.jpg)
Inside the header.php
![Page 28: Making static sites dynamic (with WordPress yo!)](https://reader031.vdocument.in/reader031/viewer/2022022415/5a648efb7f8b9a5d568b4bb3/html5/thumbnails/28.jpg)
Inside the header.php (with menu)
![Page 29: Making static sites dynamic (with WordPress yo!)](https://reader031.vdocument.in/reader031/viewer/2022022415/5a648efb7f8b9a5d568b4bb3/html5/thumbnails/29.jpg)
Inside the footer.php
![Page 30: Making static sites dynamic (with WordPress yo!)](https://reader031.vdocument.in/reader031/viewer/2022022415/5a648efb7f8b9a5d568b4bb3/html5/thumbnails/30.jpg)
Inside the footer.php (with menu)
![Page 31: Making static sites dynamic (with WordPress yo!)](https://reader031.vdocument.in/reader031/viewer/2022022415/5a648efb7f8b9a5d568b4bb3/html5/thumbnails/31.jpg)
Managing your menus from wp-admin
![Page 32: Making static sites dynamic (with WordPress yo!)](https://reader031.vdocument.in/reader031/viewer/2022022415/5a648efb7f8b9a5d568b4bb3/html5/thumbnails/32.jpg)
Scripts and styles (the right way)
![Page 33: Making static sites dynamic (with WordPress yo!)](https://reader031.vdocument.in/reader031/viewer/2022022415/5a648efb7f8b9a5d568b4bb3/html5/thumbnails/33.jpg)
Inside the index.php
![Page 34: Making static sites dynamic (with WordPress yo!)](https://reader031.vdocument.in/reader031/viewer/2022022415/5a648efb7f8b9a5d568b4bb3/html5/thumbnails/34.jpg)
Inside the index.php (assets)
![Page 35: Making static sites dynamic (with WordPress yo!)](https://reader031.vdocument.in/reader031/viewer/2022022415/5a648efb7f8b9a5d568b4bb3/html5/thumbnails/35.jpg)
Inside the functions.php
![Page 36: Making static sites dynamic (with WordPress yo!)](https://reader031.vdocument.in/reader031/viewer/2022022415/5a648efb7f8b9a5d568b4bb3/html5/thumbnails/36.jpg)
Inside the functions.php
More included scripts with WordPress: https://developer.wordpress.org/reference/functions/wp_enqueue_script/
![Page 37: Making static sites dynamic (with WordPress yo!)](https://reader031.vdocument.in/reader031/viewer/2022022415/5a648efb7f8b9a5d568b4bb3/html5/thumbnails/37.jpg)
Inside the functions.php (load in footer)
![Page 38: Making static sites dynamic (with WordPress yo!)](https://reader031.vdocument.in/reader031/viewer/2022022415/5a648efb7f8b9a5d568b4bb3/html5/thumbnails/38.jpg)
Inside the functions.php (localized vars)
![Page 39: Making static sites dynamic (with WordPress yo!)](https://reader031.vdocument.in/reader031/viewer/2022022415/5a648efb7f8b9a5d568b4bb3/html5/thumbnails/39.jpg)
Inside the functions.php (template conditionals)
![Page 40: Making static sites dynamic (with WordPress yo!)](https://reader031.vdocument.in/reader031/viewer/2022022415/5a648efb7f8b9a5d568b4bb3/html5/thumbnails/40.jpg)
The Loop
![Page 41: Making static sites dynamic (with WordPress yo!)](https://reader031.vdocument.in/reader031/viewer/2022022415/5a648efb7f8b9a5d568b4bb3/html5/thumbnails/41.jpg)
Inside the index.php
![Page 42: Making static sites dynamic (with WordPress yo!)](https://reader031.vdocument.in/reader031/viewer/2022022415/5a648efb7f8b9a5d568b4bb3/html5/thumbnails/42.jpg)
Inside the index.php (with the loop)
![Page 43: Making static sites dynamic (with WordPress yo!)](https://reader031.vdocument.in/reader031/viewer/2022022415/5a648efb7f8b9a5d568b4bb3/html5/thumbnails/43.jpg)
Inside the index.php (with the loop)
![Page 44: Making static sites dynamic (with WordPress yo!)](https://reader031.vdocument.in/reader031/viewer/2022022415/5a648efb7f8b9a5d568b4bb3/html5/thumbnails/44.jpg)
![Page 45: Making static sites dynamic (with WordPress yo!)](https://reader031.vdocument.in/reader031/viewer/2022022415/5a648efb7f8b9a5d568b4bb3/html5/thumbnails/45.jpg)
Template Parts
![Page 46: Making static sites dynamic (with WordPress yo!)](https://reader031.vdocument.in/reader031/viewer/2022022415/5a648efb7f8b9a5d568b4bb3/html5/thumbnails/46.jpg)
Inside the index.php (with the loop)
![Page 47: Making static sites dynamic (with WordPress yo!)](https://reader031.vdocument.in/reader031/viewer/2022022415/5a648efb7f8b9a5d568b4bb3/html5/thumbnails/47.jpg)
/wp-content/themes/some_theme_name/
● style.css *
● screenshot.png
● index.php *
● header.php
● footer.php
● functions.php
● /template-parts
○ callout-primary.php
Contents of a WordPress theme
![Page 48: Making static sites dynamic (with WordPress yo!)](https://reader031.vdocument.in/reader031/viewer/2022022415/5a648efb7f8b9a5d568b4bb3/html5/thumbnails/48.jpg)
Inside the callout-primary.php
![Page 49: Making static sites dynamic (with WordPress yo!)](https://reader031.vdocument.in/reader031/viewer/2022022415/5a648efb7f8b9a5d568b4bb3/html5/thumbnails/49.jpg)
Inside the index.php
![Page 50: Making static sites dynamic (with WordPress yo!)](https://reader031.vdocument.in/reader031/viewer/2022022415/5a648efb7f8b9a5d568b4bb3/html5/thumbnails/50.jpg)
![Page 51: Making static sites dynamic (with WordPress yo!)](https://reader031.vdocument.in/reader031/viewer/2022022415/5a648efb7f8b9a5d568b4bb3/html5/thumbnails/51.jpg)
/wp-content/themes/some_theme_name/
● style.css *
● screenshot.png
● index.php *
● header.php
● footer.php
● functions.php
● /template-parts
○ callout-primary.php
Contents of a WordPress theme
![Page 52: Making static sites dynamic (with WordPress yo!)](https://reader031.vdocument.in/reader031/viewer/2022022415/5a648efb7f8b9a5d568b4bb3/html5/thumbnails/52.jpg)
Merci!
Questions?
Me again:
@italianst4
ambrdetroit.com