SlideShare une entreprise Scribd logo
1  sur  34
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
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

Contenu connexe

Tendances

How to create a basic template
How to create a basic templateHow to create a basic template
How to create a basic template
vathur
 

Tendances (20)

WordPress Theme Development
WordPress Theme DevelopmentWordPress Theme Development
WordPress Theme Development
 
WordPress Theme Development
 WordPress Theme Development WordPress Theme Development
WordPress Theme Development
 
Wordpress(css,php,js,ajax)
Wordpress(css,php,js,ajax)Wordpress(css,php,js,ajax)
Wordpress(css,php,js,ajax)
 
Customizing WordPress Themes
Customizing WordPress ThemesCustomizing WordPress Themes
Customizing WordPress Themes
 
<Head> Presentation: Plugging Into Wordpress
<Head> Presentation: Plugging Into Wordpress<Head> Presentation: Plugging Into Wordpress
<Head> Presentation: Plugging Into Wordpress
 
Agile Wordpress
Agile WordpressAgile Wordpress
Agile Wordpress
 
The Way to Theme Enlightenment
The Way to Theme EnlightenmentThe Way to Theme Enlightenment
The Way to Theme Enlightenment
 
How to Prepare a WordPress Theme for Public Release
How to Prepare a WordPress Theme for Public ReleaseHow to Prepare a WordPress Theme for Public Release
How to Prepare a WordPress Theme for Public Release
 
How to Issue and Activate Free SSL using Let's Encrypt
How to Issue and Activate Free SSL using Let's EncryptHow to Issue and Activate Free SSL using Let's Encrypt
How to Issue and Activate Free SSL using Let's Encrypt
 
WordCamp Finland 2015 - WordPress Security
WordCamp Finland 2015 - WordPress SecurityWordCamp Finland 2015 - WordPress Security
WordCamp Finland 2015 - WordPress Security
 
Intro to WordPress theme development
Intro to WordPress theme developmentIntro to WordPress theme development
Intro to WordPress theme development
 
Shortcodes vs Widgets: Which one and how?
Shortcodes vs Widgets: Which one and how?Shortcodes vs Widgets: Which one and how?
Shortcodes vs Widgets: Which one and how?
 
Seven deadly theming sins
Seven deadly theming sinsSeven deadly theming sins
Seven deadly theming sins
 
How to create a basic template
How to create a basic templateHow to create a basic template
How to create a basic template
 
Wordpress theme submission requirement for Themeforest
Wordpress theme submission requirement for ThemeforestWordpress theme submission requirement for Themeforest
Wordpress theme submission requirement for Themeforest
 
WordPress 2.5 Overview - Rich Media Institute
WordPress 2.5 Overview - Rich Media InstituteWordPress 2.5 Overview - Rich Media Institute
WordPress 2.5 Overview - Rich Media Institute
 
Creating Customizable Widgets for Unpredictable Needs
Creating Customizable Widgets for Unpredictable NeedsCreating Customizable Widgets for Unpredictable Needs
Creating Customizable Widgets for Unpredictable Needs
 
Grok Drupal (7) Theming - 2011 Feb update
Grok Drupal (7) Theming - 2011 Feb updateGrok Drupal (7) Theming - 2011 Feb update
Grok Drupal (7) Theming - 2011 Feb update
 
The Way to Theme Enlightenment 2017
The Way to Theme Enlightenment 2017The Way to Theme Enlightenment 2017
The Way to Theme Enlightenment 2017
 
Contributing to WordPress Core - Peter Wilson
Contributing to WordPress Core - Peter WilsonContributing to WordPress Core - Peter Wilson
Contributing to WordPress Core - Peter Wilson
 

En vedette

Top 10 WordPress Plugins
Top 10 WordPress PluginsTop 10 WordPress Plugins
Top 10 WordPress Plugins
Reem Al-Ashry
 
10 Must Have WordPress Plugins
10 Must Have WordPress Plugins10 Must Have WordPress Plugins
10 Must Have WordPress Plugins
Affiliate Summit
 
Hands On Approach To Networking
Hands On Approach To NetworkingHands On Approach To Networking
Hands On Approach To Networking
ayanthi
 
PEDOMAN TEKNIS TATA CARA PEMOTONGAN, PENYETORAN DAN PELAPORAN PAJAK PENGHASIL...
PEDOMAN TEKNIS TATA CARA PEMOTONGAN, PENYETORAN DAN PELAPORAN PAJAK PENGHASIL...PEDOMAN TEKNIS TATA CARA PEMOTONGAN, PENYETORAN DAN PELAPORAN PAJAK PENGHASIL...
PEDOMAN TEKNIS TATA CARA PEMOTONGAN, PENYETORAN DAN PELAPORAN PAJAK PENGHASIL...
Asep suryadi
 

En vedette (20)

To build a WordPress Theme: Wordcamp Denmark 2014
To build a WordPress Theme: Wordcamp Denmark 2014To build a WordPress Theme: Wordcamp Denmark 2014
To build a WordPress Theme: Wordcamp Denmark 2014
 
WordPress Theme Design and Development Workshop - Day 2
WordPress Theme Design and Development Workshop - Day 2WordPress Theme Design and Development Workshop - Day 2
WordPress Theme Design and Development Workshop - Day 2
 
WordPress Plugin Basics
WordPress Plugin BasicsWordPress Plugin Basics
WordPress Plugin Basics
 
Top 10 WordPress Plugins
Top 10 WordPress PluginsTop 10 WordPress Plugins
Top 10 WordPress Plugins
 
Php myadmin
Php myadminPhp myadmin
Php myadmin
 
Don't Fear the Custom Theme: How to build a custom WordPress theme with only ...
Don't Fear the Custom Theme: How to build a custom WordPress theme with only ...Don't Fear the Custom Theme: How to build a custom WordPress theme with only ...
Don't Fear the Custom Theme: How to build a custom WordPress theme with only ...
 
10 Must Have WordPress Plugins
10 Must Have WordPress Plugins10 Must Have WordPress Plugins
10 Must Have WordPress Plugins
 
Federal reserve
Federal reserveFederal reserve
Federal reserve
 
Custom Database Queries in WordPress
Custom Database Queries in WordPressCustom Database Queries in WordPress
Custom Database Queries in WordPress
 
Analisis Kinerja Reksadana Saham Syariah Menggunakan Metode Sharpe, Treynor, ...
Analisis Kinerja Reksadana Saham Syariah Menggunakan Metode Sharpe, Treynor, ...Analisis Kinerja Reksadana Saham Syariah Menggunakan Metode Sharpe, Treynor, ...
Analisis Kinerja Reksadana Saham Syariah Menggunakan Metode Sharpe, Treynor, ...
 
WordPress Database: What's behind those 12 tables
WordPress Database: What's behind those 12 tablesWordPress Database: What's behind those 12 tables
WordPress Database: What's behind those 12 tables
 
Hands On Approach To Networking
Hands On Approach To NetworkingHands On Approach To Networking
Hands On Approach To Networking
 
PEDOMAN TEKNIS TATA CARA PEMOTONGAN, PENYETORAN DAN PELAPORAN PAJAK PENGHASIL...
PEDOMAN TEKNIS TATA CARA PEMOTONGAN, PENYETORAN DAN PELAPORAN PAJAK PENGHASIL...PEDOMAN TEKNIS TATA CARA PEMOTONGAN, PENYETORAN DAN PELAPORAN PAJAK PENGHASIL...
PEDOMAN TEKNIS TATA CARA PEMOTONGAN, PENYETORAN DAN PELAPORAN PAJAK PENGHASIL...
 
WordPress Theme Design - Rich Media Institute Workshop
WordPress Theme Design - Rich Media Institute WorkshopWordPress Theme Design - Rich Media Institute Workshop
WordPress Theme Design - Rich Media Institute Workshop
 
Php Vs Phyton
Php Vs PhytonPhp Vs Phyton
Php Vs Phyton
 
Tips Pribadi hebat: Mandiri, Sukses, dan Mulia
Tips Pribadi hebat: Mandiri, Sukses, dan MuliaTips Pribadi hebat: Mandiri, Sukses, dan Mulia
Tips Pribadi hebat: Mandiri, Sukses, dan Mulia
 
PHP Web Programming
PHP Web ProgrammingPHP Web Programming
PHP Web Programming
 
Installing WordPress on AWS
Installing WordPress on AWSInstalling WordPress on AWS
Installing WordPress on AWS
 
JavaScript - An Introduction
JavaScript - An IntroductionJavaScript - An Introduction
JavaScript - An Introduction
 
WordPress SEO & Optimisation
WordPress SEO & OptimisationWordPress SEO & Optimisation
WordPress SEO & Optimisation
 

Similaire à Build a WordPress theme from HTML5 template @ Telerik

Step by step guide for creating wordpress plugin
Step by step guide for creating wordpress pluginStep by step guide for creating wordpress plugin
Step by step guide for creating wordpress plugin
Mainak Goswami
 
Theme development essentials columbus oh word camp 2012
Theme development essentials   columbus oh word camp 2012Theme development essentials   columbus oh word camp 2012
Theme development essentials columbus oh word camp 2012
Joe Querin
 
Introduction To Drupal
Introduction To DrupalIntroduction To Drupal
Introduction To Drupal
Lauren Roth
 

Similaire à Build a WordPress theme from HTML5 template @ Telerik (20)

Step by step guide for creating wordpress plugin
Step by step guide for creating wordpress pluginStep by step guide for creating wordpress plugin
Step by step guide for creating wordpress plugin
 
Writing your own WordPress themes and plugins
Writing your own WordPress themes and pluginsWriting your own WordPress themes and plugins
Writing your own WordPress themes and plugins
 
Theme development essentials columbus oh word camp 2012
Theme development essentials   columbus oh word camp 2012Theme development essentials   columbus oh word camp 2012
Theme development essentials columbus oh word camp 2012
 
Introduction To Drupal
Introduction To DrupalIntroduction To Drupal
Introduction To Drupal
 
Drupal 6x Installation
Drupal 6x Installation Drupal 6x Installation
Drupal 6x Installation
 
Beginner's guide to drupal
Beginner's guide to drupalBeginner's guide to drupal
Beginner's guide to drupal
 
W pthemes
W pthemesW pthemes
W pthemes
 
Introduction to Wordpress
Introduction to WordpressIntroduction to Wordpress
Introduction to Wordpress
 
Philip Arthur Moore: Best Practices — On Breaking and Fixing WordPress Themes
Philip Arthur Moore: Best Practices — On Breaking and Fixing WordPress ThemesPhilip Arthur Moore: Best Practices — On Breaking and Fixing WordPress Themes
Philip Arthur Moore: Best Practices — On Breaking and Fixing WordPress Themes
 
CMS 101 Drupal
CMS 101 DrupalCMS 101 Drupal
CMS 101 Drupal
 
How to Install and Configure Drupal CMS
How to Install and Configure Drupal CMSHow to Install and Configure Drupal CMS
How to Install and Configure Drupal CMS
 
Introduction To Simple WordPress Plugin Development
Introduction To Simple WordPress Plugin DevelopmentIntroduction To Simple WordPress Plugin Development
Introduction To Simple WordPress Plugin Development
 
Child Themes and CSS in WordPress
Child Themes and CSS in WordPressChild Themes and CSS in WordPress
Child Themes and CSS in WordPress
 
How to Install and Configure Drupal CMS
How to Install and Configure Drupal CMSHow to Install and Configure Drupal CMS
How to Install and Configure Drupal CMS
 
Drupal 7x Installation - Introduction to Drupal Concepts
Drupal 7x Installation - Introduction to Drupal ConceptsDrupal 7x Installation - Introduction to Drupal Concepts
Drupal 7x Installation - Introduction to Drupal Concepts
 
Introduction to-concrete-5
Introduction to-concrete-5Introduction to-concrete-5
Introduction to-concrete-5
 
Introduction to-concrete-5
Introduction to-concrete-5Introduction to-concrete-5
Introduction to-concrete-5
 
Wordpress
WordpressWordpress
Wordpress
 
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to DevelopmentWordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
 
CrowdFusion: The Front-End Edition, Part I: Presentation Layer
CrowdFusion: The Front-End Edition, Part I: Presentation LayerCrowdFusion: The Front-End Edition, Part I: Presentation Layer
CrowdFusion: The Front-End Edition, Part I: Presentation Layer
 

Plus de Mario Peshev

Plus de Mario Peshev (20)

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

Dernier

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Dernier (20)

Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 

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
  • 19.
  • 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