SlideShare ist ein Scribd-Unternehmen logo
1 von 33
Downloaden Sie, um offline zu lesen
#wpcbus
                                    www.wpohio.com
                                    Follow @wpohio
                                    TONIGHT’S SPEAKER
                                      @angiemeeker
                                 WWW.ANGIEMEEKERDESIGNS.COM

Get on the internet here using username/password: dtc_guest
DISSECTING
WORDPRESS
THEME AND PAGE
TEMPLATES
WHY?
Form and function
are two different,
but related
things.
IF WORDPRESS THREW UP.
   wp-admin


   wp-content      The wp-config.php file
                   contains a roadmap to your
                   MySQL database.
   wp-includes


   other files
   including
   wp-
   wp-config.php
   .htaccess
   index.php
Inside wp-config.php is
WordPress’ roadmap for
 connecting to MySQL
       database
define (‘DB_INFORMATION’)
When installing WordPress yourself manually,
you have to enter these values after creating a MySQL database.

When using a one-click install through a hosting company,
they create the database and fill in these values for you.
WHAT’S IS IN THE DATABASE?
Tables of all of your stuff.
http://codex.wordpress.org/Database_Description

wp_commentmeta                 Meta information per comment

wp_comments                    Comments

wp_links                       Information related to the Links feature

wp_options                     Options set under Administration>Settings

wp_postmeta                    Meta information per post

wp_posts                       Posts, Pages, Navigation Menu Items

wp_terms                       Categories and Tags

wp_term_relationships          Association of posts with categories, link categories

wp_term_taxonomy               Description of taxonomy (category, link, tag)

wp_usermeta                    Meta information per user

wp_users                       List of users
CLEANING UP.
With WordPress connected to your MySQL database,
we’ll use PHP to retrieve that information through
directions specific to the page viewed on your site.

These PHP directions for each page template,
along with the CSS to style those directions,
make up your WordPress theme.
WHERE
                    TO FIND
                    YOUR
                    THEMES
                    IN YOUR
                    WP
                    INSTALL
wp-
wp-content/themes
meetup
                                WHERE
wp-admin                        TO FIND
   wp-content
                                YOUR
          themes                THEMES
                 twentytwelve   IN YOUR
              plugins
                                WP
wp-includes
                                INSTALL
other files
twentytwelve
                 ALL
                 THEMES
     index.php
                 MUST
     style.css
                 INCLUDE
                 AT
                 LEAST
                 THESE
                 FILES
.css
s   tyle
          /*
          Theme Name: Twenty Twelve
          Theme URI: http://wordpress.org/
          Description: The 2012 default theme for WordPress.
          Author: wordpressdotorg
          Author URI: http://wordpress.org/
          Version: 1.0
          Tags: black, blue, white, two-columns, fixed-width
          License:
          License URI:

          General comments (optional).
          */

          YOUR CSS GOES HERE.
php
      ex.
ind
         <?php get_header();




             (have_posts
              have_posts())
          if (have_posts()) :
                       (have_posts
                        have_posts())
                 while (have_posts()) :
                       the_post();
                       the_post();
                       the_content();
                       the_content();
                 endwhile;
                 endwhile;
          endif;
          endif;


         get_footer(); ?>
php
      ex.
ind
         My Site Name
         Site Description
         Page One
         Page Two


         The full content of my first post would be
         here.

         The full content of my second post would
         be here.




         Footer Stuff
php
      ex.
ind



                   header


                        first post
                        second post
               footer
HOW DO
YOU GET
FROM
THAT TO
THIS?
GET THERE
USING TEMPLATES &
TEMPLATE TAGS &              this we’re barely covering tonight.

CSS.        this we’re not covering at all.




  http://codex.wordpress.org/Stepping_Into_Templates
http://codex.wordpress.org/Stepping_Into_Template_Tags
twentytwelve
                                    MOST
                                    OFTEN,
index.php          page.php
                                    THEMES
style.css          comments.php
                                    INCLUDE
header.php         functions.php
sidebar.php
                                    THESE,
                   home.php
footer.php         front-page.php
                                    TOO.
single.php
archive.php
category.php
tag.php
index.php              MOST
                           OFTEN,
One template to            THEMES
rule them all.             INCLUDE
                           THESE,
    style.css              TOO.

Defines the style of the
HTML elements of your
site
home.php                MOST
                            OFTEN,
Default front page          THEMES
(which by default           INCLUDE
shows latest posts).        THESE,
                            TOO.
If you use a static page
as your front page,
this template is used for
your “Posts Page.”
front-page.php          MOST
                           OFTEN,
If you use a static page   THEMES
as your front page,        INCLUDE
this is the template used. THESE,
                           TOO.
single.php            MOST
                          OFTEN,
Displays a single post.   THEMES
                          INCLUDE
                          THESE,
                          TOO.
page.php              MOST
                          OFTEN,
Displays a single page.   THEMES
                          INCLUDE
                          THESE,
                          TOO.
header.php                                     MOST
                                                         OFTEN,
Add a call to wp_head().
<?php wp_head(); ?>
                                                         THEMES
Plugins use this action hook to add their own scripts,
stylesheets, and other functionality.
                                                         INCLUDE
Include a call to the nav menu
                                                         THESE,
<?php wp_nav_menu(); ?>                                  TOO.
footer.php                      MOST
                                      OFTEN,
Should include a call to              THEMES
the footer before the                 INCLUDE
closing body tags:                    THESE,
<?php wp_footer(); ?>
                                      TOO.
</body>
</html>

(Bad themes don’t have this,
and curse the world because of it).
comments.php      MOST
                      OFTEN,
Used to display the   THEMES
comments template.    INCLUDE
                      THESE,
                      TOO.
sidebar.php            MOST
                          OFTEN,
Used to display a sidebar THEMES
and its widgetized areas INCLUDE
                          THESE,
                          TOO.
functions.php         MOST
                          OFTEN,
Enable features such as   THEMES
Sidebars                  INCLUDE
Navigation Menus          THESE,
Post Thumbnails
                          TOO.
Post Formats
Custom Headers
Custom Backgrounds
Additional Widget Are
archive.php             MOST
                            OFTEN,
Used when a category,       THEMES
author, or date is queried. INCLUDE
                            THESE,
Will be overidden if a
                            TOO.
category.php, author.php
or date.php template is
available.
category.php    MOST
                    OFTEN,
Used to display a   THEMES
category archive.   INCLUDE
                    THESE,
                    TOO.
tag.php              MOST
                         OFTEN,
Used to display a tag    THEMES
archive.                 INCLUDE
                         THESE,
                         TOO.
    date.php
Used to display a date
archive (year, month,
week, date).
This was only an intro.
The Loop leads to…
 Multiple loops…
Templates lead to…
 Custom templates…
Template tags lead to…
 Conditional tags…
Angie Meeker
@angiemeeker
angie@angiemeekerdesigns.com
614.353.0633

Download sample files:
http://goo.gl/IFzhz

Weitere ähnliche Inhalte

Was ist angesagt?

WordPress Child Theme Workshop
WordPress Child Theme WorkshopWordPress Child Theme Workshop
WordPress Child Theme WorkshopCarme Mias
 
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?Amanda Giles
 
Cms & wordpress theme development 2011
Cms & wordpress theme development 2011Cms & wordpress theme development 2011
Cms & wordpress theme development 2011Dave Wallace
 
Alice Phieu - WordPress For Beginners
Alice Phieu - WordPress For BeginnersAlice Phieu - WordPress For Beginners
Alice Phieu - WordPress For BeginnersAlice Phieu
 
Using Featured Images with WordPress
Using Featured Images with WordPressUsing Featured Images with WordPress
Using Featured Images with WordPressSara Rosso
 
Reno-Tahoe WordCamp 2011 - WordPress End User Security - Dre Armeda
Reno-Tahoe WordCamp 2011 - WordPress End User Security - Dre ArmedaReno-Tahoe WordCamp 2011 - WordPress End User Security - Dre Armeda
Reno-Tahoe WordCamp 2011 - WordPress End User Security - Dre ArmedaDre Armeda
 
Build a WordPress theme from HTML5 template @ Telerik
Build a WordPress theme from HTML5 template @ TelerikBuild a WordPress theme from HTML5 template @ Telerik
Build a WordPress theme from HTML5 template @ TelerikMario Peshev
 
Part1 learn thelingo
Part1 learn thelingoPart1 learn thelingo
Part1 learn thelingoTaneya Koonce
 
Multisite meetup talk-2017-0710
Multisite meetup talk-2017-0710Multisite meetup talk-2017-0710
Multisite meetup talk-2017-0710reedgustow
 
Introduction to WordPress Theme Development
Introduction to WordPress Theme DevelopmentIntroduction to WordPress Theme Development
Introduction to WordPress Theme DevelopmentSitdhibong Laokok
 
Social Media Marketing for the Lean Startup
Social Media Marketing for the Lean StartupSocial Media Marketing for the Lean Startup
Social Media Marketing for the Lean StartupEric Krock
 
WordPress - Open Source Overview Presentation
WordPress - Open Source Overview PresentationWordPress - Open Source Overview Presentation
WordPress - Open Source Overview PresentationAndy Stratton
 
WordPress 101 wcmelb 2013
WordPress 101 wcmelb 2013WordPress 101 wcmelb 2013
WordPress 101 wcmelb 2013Warren Denley
 
WordPress for Beginners
WordPress for BeginnersWordPress for Beginners
WordPress for BeginnersMichelle Ames
 
Exploring the WordPress Dashboard and How to Pick & Install Plugins
Exploring the WordPress Dashboard and How to Pick & Install PluginsExploring the WordPress Dashboard and How to Pick & Install Plugins
Exploring the WordPress Dashboard and How to Pick & Install PluginsRich Plakas
 
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 EncryptMayeenul Islam
 

Was ist angesagt? (20)

WordPress Child Theme Workshop
WordPress Child Theme WorkshopWordPress Child Theme Workshop
WordPress Child Theme Workshop
 
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?
 
Cms & wordpress theme development 2011
Cms & wordpress theme development 2011Cms & wordpress theme development 2011
Cms & wordpress theme development 2011
 
Alice Phieu - WordPress For Beginners
Alice Phieu - WordPress For BeginnersAlice Phieu - WordPress For Beginners
Alice Phieu - WordPress For Beginners
 
Using Featured Images with WordPress
Using Featured Images with WordPressUsing Featured Images with WordPress
Using Featured Images with WordPress
 
Reno-Tahoe WordCamp 2011 - WordPress End User Security - Dre Armeda
Reno-Tahoe WordCamp 2011 - WordPress End User Security - Dre ArmedaReno-Tahoe WordCamp 2011 - WordPress End User Security - Dre Armeda
Reno-Tahoe WordCamp 2011 - WordPress End User Security - Dre Armeda
 
Build a WordPress theme from HTML5 template @ Telerik
Build a WordPress theme from HTML5 template @ TelerikBuild a WordPress theme from HTML5 template @ Telerik
Build a WordPress theme from HTML5 template @ Telerik
 
Part1 learn thelingo
Part1 learn thelingoPart1 learn thelingo
Part1 learn thelingo
 
Seven deadly theming sins
Seven deadly theming sinsSeven deadly theming sins
Seven deadly theming sins
 
So i have a website now what?
So i have a website now what?So i have a website now what?
So i have a website now what?
 
Multisite meetup talk-2017-0710
Multisite meetup talk-2017-0710Multisite meetup talk-2017-0710
Multisite meetup talk-2017-0710
 
Introduction to WordPress Theme Development
Introduction to WordPress Theme DevelopmentIntroduction to WordPress Theme Development
Introduction to WordPress Theme Development
 
Social Media Marketing for the Lean Startup
Social Media Marketing for the Lean StartupSocial Media Marketing for the Lean Startup
Social Media Marketing for the Lean Startup
 
WordPress - Open Source Overview Presentation
WordPress - Open Source Overview PresentationWordPress - Open Source Overview Presentation
WordPress - Open Source Overview Presentation
 
WordPress 101 wcmelb 2013
WordPress 101 wcmelb 2013WordPress 101 wcmelb 2013
WordPress 101 wcmelb 2013
 
WordPress for Beginners
WordPress for BeginnersWordPress for Beginners
WordPress for Beginners
 
Wordpress for Beginners: 10 Must Knows
Wordpress for Beginners: 10 Must KnowsWordpress for Beginners: 10 Must Knows
Wordpress for Beginners: 10 Must Knows
 
WordPress Complete Tutorial
WordPress Complete TutorialWordPress Complete Tutorial
WordPress Complete Tutorial
 
Exploring the WordPress Dashboard and How to Pick & Install Plugins
Exploring the WordPress Dashboard and How to Pick & Install PluginsExploring the WordPress Dashboard and How to Pick & Install Plugins
Exploring the WordPress Dashboard and How to Pick & Install Plugins
 
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
 

Ähnlich wie Dissecting WordPress theme and page templates

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 ...LinnAlexandra
 
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 InstituteBrendan Sera-Shriar
 
Introduction to Custom WordPress Themeing
Introduction to Custom WordPress ThemeingIntroduction to Custom WordPress Themeing
Introduction to Custom WordPress ThemeingJamie Schmid
 
Customizing WordPress Themes
Customizing WordPress ThemesCustomizing WordPress Themes
Customizing WordPress ThemesLaura Hartwig
 
WordPress Theme Workshop: Part 3
WordPress Theme Workshop: Part 3WordPress Theme Workshop: Part 3
WordPress Theme Workshop: Part 3David Bisset
 
The Way to Theme Enlightenment
The Way to Theme EnlightenmentThe Way to Theme Enlightenment
The Way to Theme EnlightenmentAmanda Giles
 
WortdPress Child themes: Why and How
WortdPress Child themes: Why and HowWortdPress Child themes: Why and How
WortdPress Child themes: Why and HowPaul Bearne
 
WordPress Theme Workshop: Misc
WordPress Theme Workshop: MiscWordPress Theme Workshop: Misc
WordPress Theme Workshop: MiscDavid Bisset
 
Getting started with WordPress development
Getting started with WordPress developmentGetting started with WordPress development
Getting started with WordPress developmentSteve Mortiboy
 
Creating Themes
Creating ThemesCreating Themes
Creating ThemesDaisyOlsen
 
Childthemes ottawa-word camp-1919
Childthemes ottawa-word camp-1919Childthemes ottawa-word camp-1919
Childthemes ottawa-word camp-1919Paul Bearne
 
Theme Wrangling 101
Theme Wrangling 101Theme Wrangling 101
Theme Wrangling 101mikeyarce
 
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 2012Joe Querin
 
Wp3 refresh pgh
Wp3 refresh pghWp3 refresh pgh
Wp3 refresh pghMrDirby
 
WordPress Structure and Best Practices
WordPress Structure and Best PracticesWordPress Structure and Best Practices
WordPress Structure and Best Practicesmarkparolisi
 
WordPress Theme Workshop: Part 4
WordPress Theme Workshop: Part 4WordPress Theme Workshop: Part 4
WordPress Theme Workshop: Part 4David Bisset
 
The Way to Theme Enlightenment 2017
The Way to Theme Enlightenment 2017The Way to Theme Enlightenment 2017
The Way to Theme Enlightenment 2017Amanda Giles
 
Getting Started With WordPress Development
Getting Started With WordPress DevelopmentGetting Started With WordPress Development
Getting Started With WordPress DevelopmentAndy Brudtkuhl
 

Ähnlich wie Dissecting WordPress theme and page templates (20)

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 ...
 
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
 
Introduction to Custom WordPress Themeing
Introduction to Custom WordPress ThemeingIntroduction to Custom WordPress Themeing
Introduction to Custom WordPress Themeing
 
WordPress Theming 101
WordPress Theming 101WordPress Theming 101
WordPress Theming 101
 
Customizing WordPress Themes
Customizing WordPress ThemesCustomizing WordPress Themes
Customizing WordPress Themes
 
WordPress Theme Workshop: Part 3
WordPress Theme Workshop: Part 3WordPress Theme Workshop: Part 3
WordPress Theme Workshop: Part 3
 
The Way to Theme Enlightenment
The Way to Theme EnlightenmentThe Way to Theme Enlightenment
The Way to Theme Enlightenment
 
WortdPress Child themes: Why and How
WortdPress Child themes: Why and HowWortdPress Child themes: Why and How
WortdPress Child themes: Why and How
 
WordPress Theme Workshop: Misc
WordPress Theme Workshop: MiscWordPress Theme Workshop: Misc
WordPress Theme Workshop: Misc
 
Getting started with WordPress development
Getting started with WordPress developmentGetting started with WordPress development
Getting started with WordPress development
 
Creating Themes
Creating ThemesCreating Themes
Creating Themes
 
Childthemes ottawa-word camp-1919
Childthemes ottawa-word camp-1919Childthemes ottawa-word camp-1919
Childthemes ottawa-word camp-1919
 
Theme Wrangling 101
Theme Wrangling 101Theme Wrangling 101
Theme Wrangling 101
 
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
 
Wp3 refresh pgh
Wp3 refresh pghWp3 refresh pgh
Wp3 refresh pgh
 
WordPress Structure and Best Practices
WordPress Structure and Best PracticesWordPress Structure and Best Practices
WordPress Structure and Best Practices
 
WordPress Theme Workshop: Part 4
WordPress Theme Workshop: Part 4WordPress Theme Workshop: Part 4
WordPress Theme Workshop: Part 4
 
The Way to Theme Enlightenment 2017
The Way to Theme Enlightenment 2017The Way to Theme Enlightenment 2017
The Way to Theme Enlightenment 2017
 
Wordpress(css,php,js,ajax)
Wordpress(css,php,js,ajax)Wordpress(css,php,js,ajax)
Wordpress(css,php,js,ajax)
 
Getting Started With WordPress Development
Getting Started With WordPress DevelopmentGetting Started With WordPress Development
Getting Started With WordPress Development
 

Kürzlich hochgeladen

Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 

Kürzlich hochgeladen (20)

Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 

Dissecting WordPress theme and page templates

  • 1. #wpcbus www.wpohio.com Follow @wpohio TONIGHT’S SPEAKER @angiemeeker WWW.ANGIEMEEKERDESIGNS.COM Get on the internet here using username/password: dtc_guest
  • 3. WHY? Form and function are two different, but related things.
  • 4. IF WORDPRESS THREW UP. wp-admin wp-content The wp-config.php file contains a roadmap to your MySQL database. wp-includes other files including wp- wp-config.php .htaccess index.php
  • 5. Inside wp-config.php is WordPress’ roadmap for connecting to MySQL database
  • 6. define (‘DB_INFORMATION’) When installing WordPress yourself manually, you have to enter these values after creating a MySQL database. When using a one-click install through a hosting company, they create the database and fill in these values for you.
  • 7. WHAT’S IS IN THE DATABASE? Tables of all of your stuff. http://codex.wordpress.org/Database_Description wp_commentmeta Meta information per comment wp_comments Comments wp_links Information related to the Links feature wp_options Options set under Administration>Settings wp_postmeta Meta information per post wp_posts Posts, Pages, Navigation Menu Items wp_terms Categories and Tags wp_term_relationships Association of posts with categories, link categories wp_term_taxonomy Description of taxonomy (category, link, tag) wp_usermeta Meta information per user wp_users List of users
  • 8. CLEANING UP. With WordPress connected to your MySQL database, we’ll use PHP to retrieve that information through directions specific to the page viewed on your site. These PHP directions for each page template, along with the CSS to style those directions, make up your WordPress theme.
  • 9. WHERE TO FIND YOUR THEMES IN YOUR WP INSTALL wp- wp-content/themes
  • 10. meetup WHERE wp-admin TO FIND wp-content YOUR themes THEMES twentytwelve IN YOUR plugins WP wp-includes INSTALL other files
  • 11. twentytwelve ALL THEMES index.php MUST style.css INCLUDE AT LEAST THESE FILES
  • 12. .css s tyle /* Theme Name: Twenty Twelve Theme URI: http://wordpress.org/ Description: The 2012 default theme for WordPress. Author: wordpressdotorg Author URI: http://wordpress.org/ Version: 1.0 Tags: black, blue, white, two-columns, fixed-width License: License URI: General comments (optional). */ YOUR CSS GOES HERE.
  • 13. php ex. ind <?php get_header(); (have_posts have_posts()) if (have_posts()) : (have_posts have_posts()) while (have_posts()) : the_post(); the_post(); the_content(); the_content(); endwhile; endwhile; endif; endif; get_footer(); ?>
  • 14. php ex. ind My Site Name Site Description Page One Page Two The full content of my first post would be here. The full content of my second post would be here. Footer Stuff
  • 15. php ex. ind header first post second post footer
  • 17. GET THERE USING TEMPLATES & TEMPLATE TAGS & this we’re barely covering tonight. CSS. this we’re not covering at all. http://codex.wordpress.org/Stepping_Into_Templates http://codex.wordpress.org/Stepping_Into_Template_Tags
  • 18. twentytwelve MOST OFTEN, index.php page.php THEMES style.css comments.php INCLUDE header.php functions.php sidebar.php THESE, home.php footer.php front-page.php TOO. single.php archive.php category.php tag.php
  • 19. index.php MOST OFTEN, One template to THEMES rule them all. INCLUDE THESE, style.css TOO. Defines the style of the HTML elements of your site
  • 20. home.php MOST OFTEN, Default front page THEMES (which by default INCLUDE shows latest posts). THESE, TOO. If you use a static page as your front page, this template is used for your “Posts Page.”
  • 21. front-page.php MOST OFTEN, If you use a static page THEMES as your front page, INCLUDE this is the template used. THESE, TOO.
  • 22. single.php MOST OFTEN, Displays a single post. THEMES INCLUDE THESE, TOO.
  • 23. page.php MOST OFTEN, Displays a single page. THEMES INCLUDE THESE, TOO.
  • 24. header.php MOST OFTEN, Add a call to wp_head(). <?php wp_head(); ?> THEMES Plugins use this action hook to add their own scripts, stylesheets, and other functionality. INCLUDE Include a call to the nav menu THESE, <?php wp_nav_menu(); ?> TOO.
  • 25. footer.php MOST OFTEN, Should include a call to THEMES the footer before the INCLUDE closing body tags: THESE, <?php wp_footer(); ?> TOO. </body> </html> (Bad themes don’t have this, and curse the world because of it).
  • 26. comments.php MOST OFTEN, Used to display the THEMES comments template. INCLUDE THESE, TOO.
  • 27. sidebar.php MOST OFTEN, Used to display a sidebar THEMES and its widgetized areas INCLUDE THESE, TOO.
  • 28. functions.php MOST OFTEN, Enable features such as THEMES Sidebars INCLUDE Navigation Menus THESE, Post Thumbnails TOO. Post Formats Custom Headers Custom Backgrounds Additional Widget Are
  • 29. archive.php MOST OFTEN, Used when a category, THEMES author, or date is queried. INCLUDE THESE, Will be overidden if a TOO. category.php, author.php or date.php template is available.
  • 30. category.php MOST OFTEN, Used to display a THEMES category archive. INCLUDE THESE, TOO.
  • 31. tag.php MOST OFTEN, Used to display a tag THEMES archive. INCLUDE THESE, TOO. date.php Used to display a date archive (year, month, week, date).
  • 32. This was only an intro. The Loop leads to… Multiple loops… Templates lead to… Custom templates… Template tags lead to… Conditional tags…