SlideShare a Scribd company logo
WordPress
Introduction to create your own theme




                                        CC:BY-NC
Info.
Name: Sitdhibong Laokok
Contact: sitdhibong@gmail.com
Class Name: WordPress Theme Dev.
Office Hours: 24/7 (for e-mail)
Checklist
✓ Download WordPress 3.x+

  http:/ /www.wordpress.org/
  http://www.wordpress.org/download


✓ Web server (Public or localhost)

✓ PHP 5.2+

✓ Database (MySQL might be good)

✓ Make it works
  http://codex.wordpress.org/Installing_WordPress
Serf the Web
               http://we.in.th
Web Site



                          WordPress Plugin


                      W
    http://we.in.th




                          WordPress Theme
Example for page structures



                             header



 There is
loop inside
this block
                      content               sidebar
for display
blog entry


           ?
  Lo o p


                             footer

               Note: I can rearrange page structure
                     whatever I want.
WordPress theme in the real world

     er
head




                                    si
                                         d
                                             eb
         t                                     ar
       en
     nt
co
Example for Template




         *A lot more at http://wordpress.org/extend/themes
Theme
Hierarchy:
The
template
files are
called to
generate a
WordPress
page
Minimum file for theme


     • style.css: required for inform theme
         information
     •   header.php: theme header
     •   index.php: main template
     •   single.php: single post display
     •   page.php: template for static home page
     •   footer.php: theme footer
     •   functions.php: functions file
style.css
 /*
     Theme Name: Abracadabra
     Theme URI: http://we.in.th/theme/abracadabra
                                                                 Theme
     Description: Just kidding the theme does not exists
     Author: Apps Tree                                            Info
     Author URI: http://we.in.th/
     Version: 0.1.0
     Tags: black, white, two-columns


     License: GPL 2.0
     License URI: license.txt
 */


 body {
                                         http://codex.wordpress.org/File_Header
      padding: 0;
      margin: 0;
 }
 .
 .
 .
Twenty Eleven theme
  screenshot.png                  WordPress
use for theme thumbnail
                          Version

                             Author

  Theme Name




                                Description




              Tags
What is the Loop ?

         The Loop is used by WordPress to
            display each of your posts.


      Enter
     the Loop                          Yep

                 Query
                for blog      Have            Display
                 posts       posts ?           post

                           No more
                             post

                                       Exit
Here’s the Loop
01: <?php
02: / index.php
     /
03: get_header(); / get content from ‘header.php’ ?>
                   /
04:
                                                              Loop start here (07-15)
05: <div id=”sl-content-wrap”>
06: <?php if ( have_posts() ) : ?>
07:   <?php while( have_posts() ) : the_post(); ?>
08:     <div id=”post-<?php the_ID(); ?>” <?php post_class(); ?>
09:          <a href=”<?php the_permalink(); ?>” title=”<?php the_title(); ?>”>
10:            <h1><?php the_title(); ?></h1>
11:          </a>
12:          <p><?php the_content(); ?></p>
13:          <p><?php the_tags(‘Tag: ‘, ‘,’, ‘.’); ?></p>   have_posts, the_post,
14:     </div>                                              the_ID, post_class,
15:   <?php endwhile; ?>                                    the_permalink, the_title,
16: <?php endif; ?>                                         the_content, the_tags are
17: </div>                                                  not PHP’s func.
18:
19: <?php get_sidebar(); / display content from ‘sidebar.php’ ?>
                          /
20:
21: <?php get_footer(); / display content from ‘footer.php’ ?>
                         /
the things we’ve get from loop

                                                            Loop result
                                                             (04-10)
  01: <!-- Header HTML - above -->
  02: <!-- In this case: there is only one blog entry -->
  03: <div id=”sl-content-wrap”>
  04:   <div id=”post-1” class=”blog-post text ...”>
  05:     <a href=”http://www.we.in.th/lorem-ipsum” title=”Lorem Ipsum”>
  06:          <h1>Lorem Ipsum</h1>
  07:     </a>
  08:     <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed
               diam nonummy nibh euismod tincidunt ut laoreet magna aliquam
               eret volutpat.</p>
  09:     <p>Tag: dummy, WP, Template.</p>
  10:   </div>
  11: </div>
  12:
  13: <!-- Sidebar HTML -->
  14:
  15: <!-- Footer HTML - below -->
What are tags from previous code ?

- It’s called ‘template tags’, here
  the often use template tags

 •   the_content()             •   the_meta()
 •   the_title()               •   the_ID()
 •   the_permalik()            •   the_post_thumbnail()
 •   the_category()            •   the_author()
 •   the_tags()                •   the_shortlink()
 •   the_date()                •   edit_post_link()
 •   the_time()           http://codex.wordpress.org/Template_Tags

 •   the_excerpt()
More Info.
• WordPress Codex

• WordPress Theme and Design
 Presentation - Menn Chris

More Related Content

What's hot (20)

PDF
WordPress Theme Development for Designers
elliotjaystocks
 
PPTX
Rebrand WordPress Admin
Chandra Prakash Thapa
 
PPTX
Build a WordPress theme from HTML5 template @ Telerik
Mario Peshev
 
PDF
Theming 101
WinnipegWordcamp
 
PPTX
Introduction to Custom WordPress Themeing
Jamie Schmid
 
DOC
Wordpress(css,php,js,ajax)
SARAVANAN RAMAOORTHY
 
PPTX
Theme development essentials columbus oh word camp 2012
Joe Querin
 
PPT
WordPress 2.5 Overview - Rich Media Institute
Brendan Sera-Shriar
 
PPTX
The Way to Theme Enlightenment 2017
Amanda Giles
 
PPTX
The Way to Theme Enlightenment
Amanda Giles
 
PDF
How to Prepare a WordPress Theme for Public Release
David Yeiser
 
PDF
Word press templates
Dan Phiffer
 
PPTX
Shortcodes vs Widgets: Which one and how?
Amanda Giles
 
KEY
WordPress Developers Israel Meetup #1
Yoav Farhi
 
PDF
Installing And Configuration for your Wordpress blog
igorgentry
 
PPTX
WordPress Structure and Best Practices
markparolisi
 
PPT
WordPress Child Themes
rfair404
 
PPTX
Creating Customizable Widgets for Unpredictable Needs
Amanda Giles
 
PPTX
Customizing WordPress Themes
Laura Hartwig
 
PDF
WordPress Theme Development Basics
Tech Liminal
 
WordPress Theme Development for Designers
elliotjaystocks
 
Rebrand WordPress Admin
Chandra Prakash Thapa
 
Build a WordPress theme from HTML5 template @ Telerik
Mario Peshev
 
Theming 101
WinnipegWordcamp
 
Introduction to Custom WordPress Themeing
Jamie Schmid
 
Wordpress(css,php,js,ajax)
SARAVANAN RAMAOORTHY
 
Theme development essentials columbus oh word camp 2012
Joe Querin
 
WordPress 2.5 Overview - Rich Media Institute
Brendan Sera-Shriar
 
The Way to Theme Enlightenment 2017
Amanda Giles
 
The Way to Theme Enlightenment
Amanda Giles
 
How to Prepare a WordPress Theme for Public Release
David Yeiser
 
Word press templates
Dan Phiffer
 
Shortcodes vs Widgets: Which one and how?
Amanda Giles
 
WordPress Developers Israel Meetup #1
Yoav Farhi
 
Installing And Configuration for your Wordpress blog
igorgentry
 
WordPress Structure and Best Practices
markparolisi
 
WordPress Child Themes
rfair404
 
Creating Customizable Widgets for Unpredictable Needs
Amanda Giles
 
Customizing WordPress Themes
Laura Hartwig
 
WordPress Theme Development Basics
Tech Liminal
 

Viewers also liked (14)

PPTX
Geekend 2012 - Jumping Into Tumblr Theme Development
Storyware
 
ODP
WordCamp TOR: Beyond The Guidelines - Theme Development Best Practices (Vol 1)
Chip Bennett
 
ODP
DrupalEasy: Intro to Theme Development
ultimike
 
PDF
Content Management Systems (CMS) & Wordpress theme development
Dave Wallace
 
PPT
Theme development mac
Lea Ann Irick Williams
 
PDF
Theme Development: From an idea to getting approved to wordpress.org
ThemeHorse
 
PDF
Rapid WordPress Theme Development
Josh Williams
 
PPT
Theme Development
Charles Coursey
 
PPTX
Better WordPress Theme Development Workflow
Rajeeb Banstola
 
ODP
Drupal Best Practices
manugoel2003
 
PDF
Approaches To WordPress Theme Development
Catch Themes
 
PDF
Best Practices in Theme Development - WordCamp Orlando 2012
Easily Amused, Inc. & The WP Valet
 
ODP
Drupal Theme Development - DrupalCon Chicago 2011
Ryan Price
 
PPTX
MSP Development Theme
TOPdesk
 
Geekend 2012 - Jumping Into Tumblr Theme Development
Storyware
 
WordCamp TOR: Beyond The Guidelines - Theme Development Best Practices (Vol 1)
Chip Bennett
 
DrupalEasy: Intro to Theme Development
ultimike
 
Content Management Systems (CMS) & Wordpress theme development
Dave Wallace
 
Theme development mac
Lea Ann Irick Williams
 
Theme Development: From an idea to getting approved to wordpress.org
ThemeHorse
 
Rapid WordPress Theme Development
Josh Williams
 
Theme Development
Charles Coursey
 
Better WordPress Theme Development Workflow
Rajeeb Banstola
 
Drupal Best Practices
manugoel2003
 
Approaches To WordPress Theme Development
Catch Themes
 
Best Practices in Theme Development - WordCamp Orlando 2012
Easily Amused, Inc. & The WP Valet
 
Drupal Theme Development - DrupalCon Chicago 2011
Ryan Price
 
MSP Development Theme
TOPdesk
 
Ad

Similar to Introduction to WordPress Theme Development (20)

PPTX
เพาเวอร์พอย Wordpress3 5-1
วัชรนนท์ กมลวิเชนทร์ชัย
 
PPTX
Getting started with WordPress development
Steve Mortiboy
 
PDF
Word Press Help Sheet
jeyakumar sengottaiyan
 
PDF
WordPress Theme Workshop: Part 3
David Bisset
 
PPTX
WordPress Themes 101 - HighEdWeb New England 2013
Curtiss Grymala
 
KEY
Intro to template hierarchy WCTO
Al Davis
 
PPTX
MCC Web Design Workshop
Faye Tandog
 
PPTX
Your First Wordpress Theme
sayed fathey
 
PDF
<Head> Presentation: Plugging Into Wordpress
Matt Harris
 
PPTX
WordPress Customization and Security
Joe Casabona
 
PDF
Don't Fear the Custom Theme: How to build a custom WordPress theme with only ...
LinnAlexandra
 
PDF
Dissecting WordPress Themes and Page Templates, WordPress Columbus Meetup
Angela Meeker
 
PPTX
Writing a WordPress Theme - HighEdWeb 2013 #WRK2
Curtiss Grymala
 
PPT
WordPress Theme Design - Rich Media Institute Workshop
Brendan Sera-Shriar
 
PPTX
Overview on WordPress theme file structure and working functionality
Rakesh Kushwaha
 
PPTX
NEPA BlogCon 2013 - WordPress Customization & Security
Michelle Davies (Hryvnak)
 
PPTX
WordPress Themes 101 - dotEduGuru Summit 2013
Curtiss Grymala
 
PPTX
Design todevelop
Jason Yingling
 
PDF
Builing a WordPress Theme
certainstrings
 
PPTX
Wordpress website development
John Faust
 
เพาเวอร์พอย Wordpress3 5-1
วัชรนนท์ กมลวิเชนทร์ชัย
 
Getting started with WordPress development
Steve Mortiboy
 
Word Press Help Sheet
jeyakumar sengottaiyan
 
WordPress Theme Workshop: Part 3
David Bisset
 
WordPress Themes 101 - HighEdWeb New England 2013
Curtiss Grymala
 
Intro to template hierarchy WCTO
Al Davis
 
MCC Web Design Workshop
Faye Tandog
 
Your First Wordpress Theme
sayed fathey
 
<Head> Presentation: Plugging Into Wordpress
Matt Harris
 
WordPress Customization and Security
Joe Casabona
 
Don't Fear the Custom Theme: How to build a custom WordPress theme with only ...
LinnAlexandra
 
Dissecting WordPress Themes and Page Templates, WordPress Columbus Meetup
Angela Meeker
 
Writing a WordPress Theme - HighEdWeb 2013 #WRK2
Curtiss Grymala
 
WordPress Theme Design - Rich Media Institute Workshop
Brendan Sera-Shriar
 
Overview on WordPress theme file structure and working functionality
Rakesh Kushwaha
 
NEPA BlogCon 2013 - WordPress Customization & Security
Michelle Davies (Hryvnak)
 
WordPress Themes 101 - dotEduGuru Summit 2013
Curtiss Grymala
 
Design todevelop
Jason Yingling
 
Builing a WordPress Theme
certainstrings
 
Wordpress website development
John Faust
 
Ad

More from Sitdhibong Laokok (15)

PDF
แม่แบบและแบบบันทึกสำหรับกระบวนการออกแบบรายละเอียดซอฟต์แวร์
Sitdhibong Laokok
 
PDF
คู่มือประกอบกระบวนการออกแบบรายละเอียดซอฟต์แวร์
Sitdhibong Laokok
 
PDF
กระบวนการออกแบบรายละเอียดซอฟต์แวร์
Sitdhibong Laokok
 
PDF
การนิยามและการปรับปรุงกระบวนการออกแบบรายละเอียดซอฟต์แวร์
Sitdhibong Laokok
 
PDF
Software Metrics: Paper Presentation
Sitdhibong Laokok
 
PDF
ข้อเสนอโครงการ.ระบบจัดการส่งดอกไม้ของฮานะ
Sitdhibong Laokok
 
PDF
SNA: Information Sharing Behavior
Sitdhibong Laokok
 
PDF
Seminar Slide: Investigating dependencies in software requirements for change...
Sitdhibong Laokok
 
PDF
Git installation
Sitdhibong Laokok
 
PDF
New M-Culture + Elementary WordPress
Sitdhibong Laokok
 
PDF
WordPress Theme Development Short Manual
Sitdhibong Laokok
 
PDF
JAXB: Create, Validate XML Message and Edit XML Schema
Sitdhibong Laokok
 
PDF
Software Architecture: Test Case Writing
Sitdhibong Laokok
 
KEY
Introduce to SVN
Sitdhibong Laokok
 
PDF
พระราชบัญญัติ ว่าด้วยการกระทำความผิดเกี่ยวกับคอมพิวเตอร์ พ.ศ. 2550
Sitdhibong Laokok
 
แม่แบบและแบบบันทึกสำหรับกระบวนการออกแบบรายละเอียดซอฟต์แวร์
Sitdhibong Laokok
 
คู่มือประกอบกระบวนการออกแบบรายละเอียดซอฟต์แวร์
Sitdhibong Laokok
 
กระบวนการออกแบบรายละเอียดซอฟต์แวร์
Sitdhibong Laokok
 
การนิยามและการปรับปรุงกระบวนการออกแบบรายละเอียดซอฟต์แวร์
Sitdhibong Laokok
 
Software Metrics: Paper Presentation
Sitdhibong Laokok
 
ข้อเสนอโครงการ.ระบบจัดการส่งดอกไม้ของฮานะ
Sitdhibong Laokok
 
SNA: Information Sharing Behavior
Sitdhibong Laokok
 
Seminar Slide: Investigating dependencies in software requirements for change...
Sitdhibong Laokok
 
Git installation
Sitdhibong Laokok
 
New M-Culture + Elementary WordPress
Sitdhibong Laokok
 
WordPress Theme Development Short Manual
Sitdhibong Laokok
 
JAXB: Create, Validate XML Message and Edit XML Schema
Sitdhibong Laokok
 
Software Architecture: Test Case Writing
Sitdhibong Laokok
 
Introduce to SVN
Sitdhibong Laokok
 
พระราชบัญญัติ ว่าด้วยการกระทำความผิดเกี่ยวกับคอมพิวเตอร์ พ.ศ. 2550
Sitdhibong Laokok
 

Recently uploaded (20)

PPTX
Wondershare Filmora Crack Free Download 2025
josanj305
 
PDF
DoS Attack vs DDoS Attack_ The Silent Wars of the Internet.pdf
CyberPro Magazine
 
PDF
Next Generation AI: Anticipatory Intelligence, Forecasting Inflection Points ...
dleka294658677
 
PDF
GDG Cloud Southlake #44: Eyal Bukchin: Tightening the Kubernetes Feedback Loo...
James Anderson
 
PDF
Deploy Faster, Run Smarter: Learn Containers with QNAP
QNAP Marketing
 
PDF
Hello I'm "AI" Your New _________________
Dr. Tathagat Varma
 
PDF
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
PPTX
CapCut Pro PC Crack Latest Version Free Free
josanj305
 
PDF
Pipeline Industry IoT - Real Time Data Monitoring
Safe Software
 
PDF
Sound the Alarm: Detection and Response
VICTOR MAESTRE RAMIREZ
 
PPTX
Practical Applications of AI in Local Government
OnBoard
 
PPTX
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
PDF
5 Things to Consider When Deploying AI in Your Enterprise
Safe Software
 
PDF
Bitkom eIDAS Summit | European Business Wallet: Use Cases, Macroeconomics, an...
Carsten Stoecker
 
PDF
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PDF
Draugnet: Anonymous Threat Reporting for a World on Fire
treyka
 
PDF
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
PDF
Understanding The True Cost of DynamoDB Webinar
ScyllaDB
 
PDF
Kubernetes - Architecture & Components.pdf
geethak285
 
PDF
Modern Decentralized Application Architectures.pdf
Kalema Edgar
 
Wondershare Filmora Crack Free Download 2025
josanj305
 
DoS Attack vs DDoS Attack_ The Silent Wars of the Internet.pdf
CyberPro Magazine
 
Next Generation AI: Anticipatory Intelligence, Forecasting Inflection Points ...
dleka294658677
 
GDG Cloud Southlake #44: Eyal Bukchin: Tightening the Kubernetes Feedback Loo...
James Anderson
 
Deploy Faster, Run Smarter: Learn Containers with QNAP
QNAP Marketing
 
Hello I'm "AI" Your New _________________
Dr. Tathagat Varma
 
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
CapCut Pro PC Crack Latest Version Free Free
josanj305
 
Pipeline Industry IoT - Real Time Data Monitoring
Safe Software
 
Sound the Alarm: Detection and Response
VICTOR MAESTRE RAMIREZ
 
Practical Applications of AI in Local Government
OnBoard
 
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
5 Things to Consider When Deploying AI in Your Enterprise
Safe Software
 
Bitkom eIDAS Summit | European Business Wallet: Use Cases, Macroeconomics, an...
Carsten Stoecker
 
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
Draugnet: Anonymous Threat Reporting for a World on Fire
treyka
 
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
Understanding The True Cost of DynamoDB Webinar
ScyllaDB
 
Kubernetes - Architecture & Components.pdf
geethak285
 
Modern Decentralized Application Architectures.pdf
Kalema Edgar
 

Introduction to WordPress Theme Development

  • 1. WordPress Introduction to create your own theme CC:BY-NC
  • 2. Info. Name: Sitdhibong Laokok Contact: [email protected] Class Name: WordPress Theme Dev. Office Hours: 24/7 (for e-mail)
  • 3. Checklist ✓ Download WordPress 3.x+ http:/ /www.wordpress.org/ http://www.wordpress.org/download ✓ Web server (Public or localhost) ✓ PHP 5.2+ ✓ Database (MySQL might be good) ✓ Make it works http://codex.wordpress.org/Installing_WordPress
  • 4. Serf the Web http://we.in.th
  • 5. Web Site WordPress Plugin W http://we.in.th WordPress Theme
  • 6. Example for page structures header There is loop inside this block content sidebar for display blog entry ? Lo o p footer Note: I can rearrange page structure whatever I want.
  • 7. WordPress theme in the real world er head si d eb t ar en nt co
  • 8. Example for Template *A lot more at http://wordpress.org/extend/themes
  • 10. Minimum file for theme • style.css: required for inform theme information • header.php: theme header • index.php: main template • single.php: single post display • page.php: template for static home page • footer.php: theme footer • functions.php: functions file
  • 11. style.css /* Theme Name: Abracadabra Theme URI: http://we.in.th/theme/abracadabra Theme Description: Just kidding the theme does not exists Author: Apps Tree Info Author URI: http://we.in.th/ Version: 0.1.0 Tags: black, white, two-columns License: GPL 2.0 License URI: license.txt */ body { http://codex.wordpress.org/File_Header padding: 0; margin: 0; } . . .
  • 12. Twenty Eleven theme screenshot.png WordPress use for theme thumbnail Version Author Theme Name Description Tags
  • 13. What is the Loop ? The Loop is used by WordPress to display each of your posts. Enter the Loop Yep Query for blog Have Display posts posts ? post No more post Exit
  • 14. Here’s the Loop 01: <?php 02: / index.php / 03: get_header(); / get content from ‘header.php’ ?> / 04: Loop start here (07-15) 05: <div id=”sl-content-wrap”> 06: <?php if ( have_posts() ) : ?> 07: <?php while( have_posts() ) : the_post(); ?> 08: <div id=”post-<?php the_ID(); ?>” <?php post_class(); ?> 09: <a href=”<?php the_permalink(); ?>” title=”<?php the_title(); ?>”> 10: <h1><?php the_title(); ?></h1> 11: </a> 12: <p><?php the_content(); ?></p> 13: <p><?php the_tags(‘Tag: ‘, ‘,’, ‘.’); ?></p> have_posts, the_post, 14: </div> the_ID, post_class, 15: <?php endwhile; ?> the_permalink, the_title, 16: <?php endif; ?> the_content, the_tags are 17: </div> not PHP’s func. 18: 19: <?php get_sidebar(); / display content from ‘sidebar.php’ ?> / 20: 21: <?php get_footer(); / display content from ‘footer.php’ ?> /
  • 15. the things we’ve get from loop Loop result (04-10) 01: <!-- Header HTML - above --> 02: <!-- In this case: there is only one blog entry --> 03: <div id=”sl-content-wrap”> 04: <div id=”post-1” class=”blog-post text ...”> 05: <a href=”http://www.we.in.th/lorem-ipsum” title=”Lorem Ipsum”> 06: <h1>Lorem Ipsum</h1> 07: </a> 08: <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet magna aliquam eret volutpat.</p> 09: <p>Tag: dummy, WP, Template.</p> 10: </div> 11: </div> 12: 13: <!-- Sidebar HTML --> 14: 15: <!-- Footer HTML - below -->
  • 16. What are tags from previous code ? - It’s called ‘template tags’, here the often use template tags • the_content() • the_meta() • the_title() • the_ID() • the_permalik() • the_post_thumbnail() • the_category() • the_author() • the_tags() • the_shortlink() • the_date() • edit_post_link() • the_time() http://codex.wordpress.org/Template_Tags • the_excerpt()
  • 17. More Info. • WordPress Codex • WordPress Theme and Design Presentation - Menn Chris

Editor's Notes