SlideShare a Scribd company logo
WordPress
     Build a WordPress theme from HTML5 template




Mario Peshev
CTO @ Devrix
TMS @ OnTheGo
About me
 ThemeForest author

 Open Source trainer

   and consultant at DevriX
 Technical Marketing

   Specialist at OnTheGoSystems
 Building custom themes, plugins,
 extending premium solutions based on the
 WP platform; WPTRT member
 Java/PHP/Python background
                                                2
OnTheGoSystems




                 3
WordPress
 Super mega powerful!

   (surprise, surprise) 
 Over 70 000 000 websites   online
 Tens of thousands of themes and plugins   (both
 free and premium)
 Ready foreCommerce, Groupon, Q&A, forum,
 social network, ticketing system and more



                                                    4
Integrating HTML5
template into a WP theme
Start
 We want to integrate our HTML sliced   design
 into WordPress
 The end results   are:
   Same look and feel (design)
   Dynamic functionality
   Working menus, areas, blocks, comments and
    other CMS-related elements




                                                   6
Warning!




           7
Super important
 A PSD is   not:
   A brochure
   A calendar
   A wallpaper / magazine cover / whatever
 Site design should work with:

   Different content (thousands of pages)
   Different resolutions/browsers/operating
    systems/platforms

                                               8
CMS integration
 Every CMS has it’sown specifics and
 expectations in terms of markup
 It’s best to know the system in depth in order
 to draw the appropriate design and slice it
 properly




                                                   9
WordPress
Let’s integrate!
Our target
 Some random free HTML5 template




                                            11
Step 0
 Make sure that:

   Code is valid and understandable
   Code is reusable
   Template markup seems WP-compatible
 Note: some super basic   PHP knowledge is
 required




                                                 12
Step 1
 Download the HTML template

 Browse all required resources:

   HTML
   CSS
   JS
   Flash
   Fonts


                                            13
Step 2
 Setup development environment – XAMPP,
 LAMP/WAMP/MAMP
 Create a database   for the new install
 Install WordPress   (hint: famous 5-min install or
 my video)
 Create a new folder in wp-content/themes




                                                       14
Step 3
 Add the required files there:

   style.css
   index.php
 These are the two mandatory files for a
 WordPress theme




                                                 15
Step 4
 Add an appropriate heading to style.css:




                                                 16
Step 5
 Migrate your   template CSS to style.css
 If there are more than 1 stylesheet files, there
 are 2 options:
   Include them in header with normal <style> tag
   Use wp_enqueue_style in functions file




                                                      17
Step 6
 Add header.php, footer.php and sidebar.php

 Separate the common partsof the site and
 move them to header, footer or sidebar pages
 There are other template files as well




                                                    18
Build a WordPress theme from HTML5 template @ Telerik
Step 7
 Fix all static   image paths in the style.css file




 Organize images in images/ folder

                                                        20
Step 8
 Add the style.css file to the header of the site:




 Fill in the index.php code for all
                                 pages
 (everything left besides header/footer code




                                                      21
Step 9
 Clear out all static
                 page content from your
 markup (the demo texts – title and static
 content)
 Use this snippet instead:




                                               22
Step 10
 Use predefined tags, such as:

   the_title()
   the_content()
   the_permalink()
   They work in a loop
   A single post view is like an array with 1
    element



                                                      23
Step 11
 Move index.php to home.php or front.php if
 you want a landing page
 Replicate index.php, but:

   Add sidebar section
   Correct small dynamic details such as dates
    Use date(‘Y’), date(‘M’), date(‘d’) for y/m/d




                                                        24
Step 12
 Define sidebar




                             25
Step 13
 Add sidebar   to a page




                                      26
Step 14
 Define menu




 Call it a few times or use   register_nav_menus
 for several menus


                                                    27
Step 15
 Add the menu to a block in the markup




 theme_location is sufficient
                                               28
Step 16
 Call comment_form() or
 comments_template(…):




                                     29
Step 17
 Enjoy! 




                       30
What’s next?
 Once you’re ready   with the theme, you could:
  Add some complex plugins for more
   functionality
  Integrate some APIs to social networks or
   remote services
  Work on the next theme of yours




                                                   31
Recommended Plugins
 Types and Views

 WPML

 WooCommerce

 BuddyPress

 S2Member

 Contact Form 7 / Gravity   Forms
 Free and Paid



                                          32
Want to be a WP theme ninja?
 Check out Theme Reviewers Team guides:

   Theme Review
   Theme Unit Test
   WPTRT page
   Theme-Check plugin
 Become a Pro   and submit on ThemeForest and
 WPORG
 Get popular and we’ll provide a   free WPML
 author license for you.
                                                 33
WordPress




                  Questions?

http://me.peshev.net/    http://html5course.telerik.com

More Related Content

What's hot (20)

PDF
WordPress Theme Development
WisdmLabs
 
PPTX
WordPress Theme Development
Bijay Oli
 
DOC
Wordpress(css,php,js,ajax)
SARAVANAN RAMAOORTHY
 
PPTX
Customizing WordPress Themes
Laura Hartwig
 
PDF
<Head> Presentation: Plugging Into Wordpress
Matt Harris
 
PDF
Agile Wordpress
Filippo Dino
 
PPTX
The Way to Theme Enlightenment
Amanda Giles
 
PDF
How to Prepare a WordPress Theme for Public Release
David Yeiser
 
PPTX
How to Issue and Activate Free SSL using Let's Encrypt
Mayeenul Islam
 
PDF
WordCamp Finland 2015 - WordPress Security
Tiia Rantanen
 
PDF
Intro to WordPress theme development
Thad Allender
 
PPTX
Shortcodes vs Widgets: Which one and how?
Amanda Giles
 
PDF
Seven deadly theming sins
George Stephanis
 
PDF
How to create a basic template
vathur
 
PPTX
Wordpress theme submission requirement for Themeforest
Enayet Rajib
 
PPT
WordPress 2.5 Overview - Rich Media Institute
Brendan Sera-Shriar
 
PPTX
Creating Customizable Widgets for Unpredictable Needs
Amanda Giles
 
PDF
Grok Drupal (7) Theming - 2011 Feb update
Laura Scott
 
PPTX
The Way to Theme Enlightenment 2017
Amanda Giles
 
PDF
Contributing to WordPress Core - Peter Wilson
WordCamp Sydney
 
WordPress Theme Development
WisdmLabs
 
WordPress Theme Development
Bijay Oli
 
Wordpress(css,php,js,ajax)
SARAVANAN RAMAOORTHY
 
Customizing WordPress Themes
Laura Hartwig
 
<Head> Presentation: Plugging Into Wordpress
Matt Harris
 
Agile Wordpress
Filippo Dino
 
The Way to Theme Enlightenment
Amanda Giles
 
How to Prepare a WordPress Theme for Public Release
David Yeiser
 
How to Issue and Activate Free SSL using Let's Encrypt
Mayeenul Islam
 
WordCamp Finland 2015 - WordPress Security
Tiia Rantanen
 
Intro to WordPress theme development
Thad Allender
 
Shortcodes vs Widgets: Which one and how?
Amanda Giles
 
Seven deadly theming sins
George Stephanis
 
How to create a basic template
vathur
 
Wordpress theme submission requirement for Themeforest
Enayet Rajib
 
WordPress 2.5 Overview - Rich Media Institute
Brendan Sera-Shriar
 
Creating Customizable Widgets for Unpredictable Needs
Amanda Giles
 
Grok Drupal (7) Theming - 2011 Feb update
Laura Scott
 
The Way to Theme Enlightenment 2017
Amanda Giles
 
Contributing to WordPress Core - Peter Wilson
WordCamp Sydney
 

Viewers also liked (20)

PPTX
To build a WordPress Theme: Wordcamp Denmark 2014
James Bonham
 
PPSX
WordPress Theme Design and Development Workshop - Day 2
Mizanur Rahaman Mizan
 
PPT
WordPress Plugin Basics
Amanda Giles
 
ODP
Top 10 WordPress Plugins
Reem Al-Ashry
 
PDF
Don't Fear the Custom Theme: How to build a custom WordPress theme with only ...
LinnAlexandra
 
PPTX
10 Must Have WordPress Plugins
Affiliate Summit
 
PDF
Federal reserve
William Daniels
 
PPTX
Custom Database Queries in WordPress
topher1kenobe
 
PPTX
Analisis Kinerja Reksadana Saham Syariah Menggunakan Metode Sharpe, Treynor, ...
Arsyil Hendra Saputra
 
PDF
WordPress Database: What's behind those 12 tables
Mauricio Gelves
 
ODP
Hands On Approach To Networking
ayanthi
 
PPTX
PEDOMAN TEKNIS TATA CARA PEMOTONGAN, PENYETORAN DAN PELAPORAN PAJAK PENGHASIL...
Asep suryadi
 
PPT
WordPress Theme Design - Rich Media Institute Workshop
Brendan Sera-Shriar
 
PPTX
Php Vs Phyton
Francis Guison
 
PDF
Tips Pribadi hebat: Mandiri, Sukses, dan Mulia
An Nuur Budi Utama
 
ODP
PHP Web Programming
Muthuselvam RS
 
PDF
Installing WordPress on AWS
Manish Jain
 
PPT
JavaScript - An Introduction
Manvendra Singh
 
PDF
WordPress SEO & Optimisation
Joost de Valk
 
To build a WordPress Theme: Wordcamp Denmark 2014
James Bonham
 
WordPress Theme Design and Development Workshop - Day 2
Mizanur Rahaman Mizan
 
WordPress Plugin Basics
Amanda Giles
 
Top 10 WordPress Plugins
Reem Al-Ashry
 
Don't Fear the Custom Theme: How to build a custom WordPress theme with only ...
LinnAlexandra
 
10 Must Have WordPress Plugins
Affiliate Summit
 
Federal reserve
William Daniels
 
Custom Database Queries in WordPress
topher1kenobe
 
Analisis Kinerja Reksadana Saham Syariah Menggunakan Metode Sharpe, Treynor, ...
Arsyil Hendra Saputra
 
WordPress Database: What's behind those 12 tables
Mauricio Gelves
 
Hands On Approach To Networking
ayanthi
 
PEDOMAN TEKNIS TATA CARA PEMOTONGAN, PENYETORAN DAN PELAPORAN PAJAK PENGHASIL...
Asep suryadi
 
WordPress Theme Design - Rich Media Institute Workshop
Brendan Sera-Shriar
 
Php Vs Phyton
Francis Guison
 
Tips Pribadi hebat: Mandiri, Sukses, dan Mulia
An Nuur Budi Utama
 
PHP Web Programming
Muthuselvam RS
 
Installing WordPress on AWS
Manish Jain
 
JavaScript - An Introduction
Manvendra Singh
 
WordPress SEO & Optimisation
Joost de Valk
 
Ad

Similar to Build a WordPress theme from HTML5 template @ Telerik (20)

PDF
Crash Course in Theme Surgery
Rational Frank
 
PDF
Week 5 open session
Randall Rode
 
PPTX
Introduction to Wordpress
Md Farhad Hussain mun
 
PPTX
MCC Web Design Workshop
Faye Tandog
 
PPTX
Customizing WordPress Themes
Domestic Equity Studio
 
PPTX
Design todevelop
Jason Yingling
 
PPTX
Writing your own WordPress themes and plugins
Stephanie Wells
 
PPT
WordPress Development Confoo 2010
Brendan Sera-Shriar
 
PPTX
Word Press As A Cms
Justin Sisley
 
PDF
Newbies guide to customizing word press themes 25
New Tricks
 
PDF
Dissecting WordPress Themes and Page Templates, WordPress Columbus Meetup
Angela Meeker
 
PPTX
Creating WordPress Sites in 2 Hours
Svetlin Nakov
 
PDF
Making WordPress Your Own: Theme Customization & Creation
Mykl Roventine
 
PDF
Arizona WP - Building a WordPress Theme
certainstrings
 
KEY
A Beginner’s Guide to Wordpress - WordCamp Toronto 2011
Kathryn Presner
 
PDF
Managing WordPress Websites - Training Course - Feb 2015
John A. Walsh
 
PDF
WordPress Theming 101
Zero Point Development
 
KEY
American University WordPress Theming Lecture
Aaron Brazell
 
PDF
Make WordPress Themes
Alison Foxall
 
KEY
Developing client themes for theme review for WordCamp Edmonton
Curtis McHale
 
Crash Course in Theme Surgery
Rational Frank
 
Week 5 open session
Randall Rode
 
Introduction to Wordpress
Md Farhad Hussain mun
 
MCC Web Design Workshop
Faye Tandog
 
Customizing WordPress Themes
Domestic Equity Studio
 
Design todevelop
Jason Yingling
 
Writing your own WordPress themes and plugins
Stephanie Wells
 
WordPress Development Confoo 2010
Brendan Sera-Shriar
 
Word Press As A Cms
Justin Sisley
 
Newbies guide to customizing word press themes 25
New Tricks
 
Dissecting WordPress Themes and Page Templates, WordPress Columbus Meetup
Angela Meeker
 
Creating WordPress Sites in 2 Hours
Svetlin Nakov
 
Making WordPress Your Own: Theme Customization & Creation
Mykl Roventine
 
Arizona WP - Building a WordPress Theme
certainstrings
 
A Beginner’s Guide to Wordpress - WordCamp Toronto 2011
Kathryn Presner
 
Managing WordPress Websites - Training Course - Feb 2015
John A. Walsh
 
WordPress Theming 101
Zero Point Development
 
American University WordPress Theming Lecture
Aaron Brazell
 
Make WordPress Themes
Alison Foxall
 
Developing client themes for theme review for WordCamp Edmonton
Curtis McHale
 
Ad

More from Mario Peshev (20)

PDF
Why Does an eCommerce Store Cost 200 to 100K And More?
Mario Peshev
 
PDF
Management Decision Making Process
Mario Peshev
 
PDF
The Future Of WordPress In 2020
Mario Peshev
 
PDF
What Makes PHP An Awesome Language
Mario Peshev
 
PDF
Top 6 Business Tips for October 2019
Mario Peshev
 
PDF
The Future of WordPress And WooCommerce
Mario Peshev
 
PPTX
Tips for Successful WordPress Enterprise Projects
Mario Peshev
 
PDF
WordPress Architecture for Tech-Savvy Managers
Mario Peshev
 
PDF
Business and Monetization Opportunities for Developers
Mario Peshev
 
PDF
Building SaaS with WordPress - WordCamp Netherlands 2016
Mario Peshev
 
PDF
WordPress Code Architecture
Mario Peshev
 
PDF
Virtual Company - Go Limitless
Mario Peshev
 
PDF
Debugging WordPress
Mario Peshev
 
PDF
Platforms based on WordPress
Mario Peshev
 
PDF
WordPress Theme Reviewers Team
Mario Peshev
 
PDF
Get Involved with WordPress
Mario Peshev
 
PDF
Contributing to WordPress
Mario Peshev
 
PDF
Start Your Website for Free!
Mario Peshev
 
PDF
Choosing a WordPress Theme
Mario Peshev
 
PDF
Sass in 5
Mario Peshev
 
Why Does an eCommerce Store Cost 200 to 100K And More?
Mario Peshev
 
Management Decision Making Process
Mario Peshev
 
The Future Of WordPress In 2020
Mario Peshev
 
What Makes PHP An Awesome Language
Mario Peshev
 
Top 6 Business Tips for October 2019
Mario Peshev
 
The Future of WordPress And WooCommerce
Mario Peshev
 
Tips for Successful WordPress Enterprise Projects
Mario Peshev
 
WordPress Architecture for Tech-Savvy Managers
Mario Peshev
 
Business and Monetization Opportunities for Developers
Mario Peshev
 
Building SaaS with WordPress - WordCamp Netherlands 2016
Mario Peshev
 
WordPress Code Architecture
Mario Peshev
 
Virtual Company - Go Limitless
Mario Peshev
 
Debugging WordPress
Mario Peshev
 
Platforms based on WordPress
Mario Peshev
 
WordPress Theme Reviewers Team
Mario Peshev
 
Get Involved with WordPress
Mario Peshev
 
Contributing to WordPress
Mario Peshev
 
Start Your Website for Free!
Mario Peshev
 
Choosing a WordPress Theme
Mario Peshev
 
Sass in 5
Mario Peshev
 

Recently uploaded (20)

PDF
Database Benchmarking for Performance Masterclass: Session 1 - Benchmarking F...
ScyllaDB
 
PDF
My Journey from CAD to BIM: A True Underdog Story
Safe Software
 
PDF
ArcGIS Utility Network Migration - The Hunter Water Story
Safe Software
 
PPTX
Curietech AI in action - Accelerate MuleSoft development
shyamraj55
 
PPTX
Practical Applications of AI in Local Government
OnBoard
 
PDF
Why aren't you using FME Flow's CPU Time?
Safe Software
 
PPSX
Usergroup - OutSystems Architecture.ppsx
Kurt Vandevelde
 
DOCX
Daily Lesson Log MATATAG ICT TEchnology 8
LOIDAALMAZAN3
 
PDF
From Chatbot to Destroyer of Endpoints - Can ChatGPT Automate EDR Bypasses (1...
Priyanka Aash
 
PPTX
reInforce 2025 Lightning Talk - Scott Francis.pptx
ScottFrancis51
 
PDF
UiPath Agentic AI ile Akıllı Otomasyonun Yeni Çağı
UiPathCommunity
 
PDF
Redefining Work in the Age of AI - What to expect? How to prepare? Why it mat...
Malinda Kapuruge
 
PDF
Plugging AI into everything: Model Context Protocol Simplified.pdf
Abati Adewale
 
PDF
Java 25 and Beyond - A Roadmap of Innovations
Ana-Maria Mihalceanu
 
PDF
Open Source Milvus Vector Database v 2.6
Zilliz
 
PDF
Kubernetes - Architecture & Components.pdf
geethak285
 
PDF
Database Benchmarking for Performance Masterclass: Session 2 - Data Modeling ...
ScyllaDB
 
PPTX
Paycifi - Programmable Trust_Breakfast_PPTXT
FinTech Belgium
 
PDF
EIS-Webinar-Engineering-Retail-Infrastructure-06-16-2025.pdf
Earley Information Science
 
PDF
“Scaling i.MX Applications Processors’ Native Edge AI with Discrete AI Accele...
Edge AI and Vision Alliance
 
Database Benchmarking for Performance Masterclass: Session 1 - Benchmarking F...
ScyllaDB
 
My Journey from CAD to BIM: A True Underdog Story
Safe Software
 
ArcGIS Utility Network Migration - The Hunter Water Story
Safe Software
 
Curietech AI in action - Accelerate MuleSoft development
shyamraj55
 
Practical Applications of AI in Local Government
OnBoard
 
Why aren't you using FME Flow's CPU Time?
Safe Software
 
Usergroup - OutSystems Architecture.ppsx
Kurt Vandevelde
 
Daily Lesson Log MATATAG ICT TEchnology 8
LOIDAALMAZAN3
 
From Chatbot to Destroyer of Endpoints - Can ChatGPT Automate EDR Bypasses (1...
Priyanka Aash
 
reInforce 2025 Lightning Talk - Scott Francis.pptx
ScottFrancis51
 
UiPath Agentic AI ile Akıllı Otomasyonun Yeni Çağı
UiPathCommunity
 
Redefining Work in the Age of AI - What to expect? How to prepare? Why it mat...
Malinda Kapuruge
 
Plugging AI into everything: Model Context Protocol Simplified.pdf
Abati Adewale
 
Java 25 and Beyond - A Roadmap of Innovations
Ana-Maria Mihalceanu
 
Open Source Milvus Vector Database v 2.6
Zilliz
 
Kubernetes - Architecture & Components.pdf
geethak285
 
Database Benchmarking for Performance Masterclass: Session 2 - Data Modeling ...
ScyllaDB
 
Paycifi - Programmable Trust_Breakfast_PPTXT
FinTech Belgium
 
EIS-Webinar-Engineering-Retail-Infrastructure-06-16-2025.pdf
Earley Information Science
 
“Scaling i.MX Applications Processors’ Native Edge AI with Discrete AI Accele...
Edge AI and Vision Alliance
 

Build a WordPress theme from HTML5 template @ Telerik

  • 1. WordPress Build a WordPress theme from HTML5 template Mario Peshev CTO @ Devrix TMS @ OnTheGo
  • 2. About me  ThemeForest author  Open Source trainer and consultant at DevriX  Technical Marketing Specialist at OnTheGoSystems  Building custom themes, plugins, extending premium solutions based on the WP platform; WPTRT member  Java/PHP/Python background 2
  • 4. WordPress  Super mega powerful!  (surprise, surprise)   Over 70 000 000 websites online  Tens of thousands of themes and plugins (both free and premium)  Ready foreCommerce, Groupon, Q&A, forum, social network, ticketing system and more 4
  • 6. Start  We want to integrate our HTML sliced design into WordPress  The end results are:  Same look and feel (design)  Dynamic functionality  Working menus, areas, blocks, comments and other CMS-related elements 6
  • 8. Super important  A PSD is not:  A brochure  A calendar  A wallpaper / magazine cover / whatever  Site design should work with:  Different content (thousands of pages)  Different resolutions/browsers/operating systems/platforms 8
  • 9. CMS integration  Every CMS has it’sown specifics and expectations in terms of markup  It’s best to know the system in depth in order to draw the appropriate design and slice it properly 9
  • 11. Our target  Some random free HTML5 template 11
  • 12. Step 0  Make sure that:  Code is valid and understandable  Code is reusable  Template markup seems WP-compatible  Note: some super basic PHP knowledge is required 12
  • 13. Step 1  Download the HTML template  Browse all required resources:  HTML  CSS  JS  Flash  Fonts 13
  • 14. Step 2  Setup development environment – XAMPP, LAMP/WAMP/MAMP  Create a database for the new install  Install WordPress (hint: famous 5-min install or my video)  Create a new folder in wp-content/themes 14
  • 15. Step 3  Add the required files there:  style.css  index.php  These are the two mandatory files for a WordPress theme 15
  • 16. Step 4  Add an appropriate heading to style.css: 16
  • 17. Step 5  Migrate your template CSS to style.css  If there are more than 1 stylesheet files, there are 2 options:  Include them in header with normal <style> tag  Use wp_enqueue_style in functions file 17
  • 18. Step 6  Add header.php, footer.php and sidebar.php  Separate the common partsof the site and move them to header, footer or sidebar pages  There are other template files as well 18
  • 20. Step 7  Fix all static image paths in the style.css file  Organize images in images/ folder 20
  • 21. Step 8  Add the style.css file to the header of the site:  Fill in the index.php code for all pages (everything left besides header/footer code 21
  • 22. Step 9  Clear out all static page content from your markup (the demo texts – title and static content)  Use this snippet instead: 22
  • 23. Step 10  Use predefined tags, such as:  the_title()  the_content()  the_permalink()  They work in a loop  A single post view is like an array with 1 element 23
  • 24. Step 11  Move index.php to home.php or front.php if you want a landing page  Replicate index.php, but:  Add sidebar section  Correct small dynamic details such as dates  Use date(‘Y’), date(‘M’), date(‘d’) for y/m/d 24
  • 25. Step 12  Define sidebar 25
  • 26. Step 13  Add sidebar to a page 26
  • 27. Step 14  Define menu  Call it a few times or use register_nav_menus for several menus 27
  • 28. Step 15  Add the menu to a block in the markup  theme_location is sufficient 28
  • 29. Step 16  Call comment_form() or comments_template(…): 29
  • 31. What’s next?  Once you’re ready with the theme, you could:  Add some complex plugins for more functionality  Integrate some APIs to social networks or remote services  Work on the next theme of yours 31
  • 32. Recommended Plugins  Types and Views  WPML  WooCommerce  BuddyPress  S2Member  Contact Form 7 / Gravity Forms  Free and Paid 32
  • 33. Want to be a WP theme ninja?  Check out Theme Reviewers Team guides:  Theme Review  Theme Unit Test  WPTRT page  Theme-Check plugin  Become a Pro and submit on ThemeForest and WPORG  Get popular and we’ll provide a free WPML author license for you. 33
  • 34. WordPress Questions? http://me.peshev.net/ http://html5course.telerik.com