Post on 16-Apr-2017
transcript
Jevgēnijs Cibankovs
Situations• Have custom page design• Non WP, HTML template• Easy to use adminstration• Clean code
How to get those custom fields?
Install Advanced Custom Fields plugin (ACF)• Simple and intuitive custom fields• Field group, fields and location rules• 20 field types• API
Building Theme. Outputing data
DO YOU LIKE THIS?
Install Timber plugin• Library for building themes• DRY and MVC principles• Don’t repeat yourself• Model–View–Controller
• Object-oriented Posts, Terms, Users and More• Twig Template Engine
Timber starter theme
For newbies
Templating
Home page Twig template• Put page HTML in content block
Use partials!
Include partials!
Most common thing in WP blog?
Get posts
Extend timber!
Image and content manipulations
Outputing posts
What next?• Learn ACF• http://www.advancedcustomfields.com/
• Learn Timber • http://upstatement.com/timber/• https://github.com/jarednova/timber
• Build your page!
Questions?
Thank You!