Dissecting WordPress Themes and Page Templates, WordPress Columbus Meetup
Upcoming SlideShare
Loading in...5
×
 

Dissecting WordPress Themes and Page Templates, WordPress Columbus Meetup

on

  • 4,442 views

Dissecting WordPress Themes and Page Templates, WordPress Columbus Meetup

Dissecting WordPress Themes and Page Templates, WordPress Columbus Meetup

Statistics

Views

Total Views
4,442
Slideshare-icon Views on SlideShare
4,442
Embed Views
0

Actions

Likes
0
Downloads
5
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Dissecting WordPress Themes and Page Templates, WordPress Columbus Meetup Dissecting WordPress Themes and Page Templates, WordPress Columbus Meetup Presentation Transcript

    • #wpcbus www.wpohio.com Follow @wpohio TONIGHT’S SPEAKER @angiemeeker WWW.ANGIEMEEKERDESIGNS.COMGet on the internet here using username/password: dtc_guest
    • DISSECTINGWORDPRESSTHEME AND PAGETEMPLATES
    • WHY?Form and functionare two different,but relatedthings.
    • 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 isWordPress’ 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_Descriptionwp_commentmeta Meta information per commentwp_comments Commentswp_links Information related to the Links featurewp_options Options set under Administration>Settingswp_postmeta Meta information per postwp_posts Posts, Pages, Navigation Menu Itemswp_terms Categories and Tagswp_term_relationships Association of posts with categories, link categorieswp_term_taxonomy Description of taxonomy (category, link, tag)wp_usermeta Meta information per userwp_users List of users
    • CLEANING UP.With WordPress connected to your MySQL database,we’ll use PHP to retrieve that information throughdirections 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 INSTALLwp-wp-content/themes
    • meetup WHEREwp-admin TO FIND wp-content YOUR themes THEMES twentytwelve IN YOUR plugins WPwp-includes INSTALLother files
    • twentytwelve ALL THEMES index.php MUST style.css INCLUDE AT LEAST THESE FILES
    • .csss 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 DOYOU GETFROMTHAT TOTHIS?
    • GET THEREUSING TEMPLATES &TEMPLATE TAGS & this we’re barely covering tonight.CSS. this we’re not covering at all. http://codex.wordpress.org/Stepping_Into_Templateshttp://codex.wordpress.org/Stepping_Into_Template_Tags
    • twentytwelve MOST OFTEN,index.php page.php THEMESstyle.css comments.php INCLUDEheader.php functions.phpsidebar.php THESE, home.phpfooter.php front-page.php TOO.single.phparchive.phpcategory.phptag.php
    • index.php MOST OFTEN,One template to THEMESrule them all. INCLUDE THESE, style.css TOO.Defines the style of theHTML elements of yoursite
    • home.php MOST OFTEN,Default front page THEMES(which by default INCLUDEshows latest posts). THESE, TOO.If you use a static pageas your front page,this template is used foryour “Posts Page.”
    • front-page.php MOST OFTEN,If you use a static page THEMESas your front page, INCLUDEthis 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(); ?> THEMESPlugins use this action hook to add their own scripts,stylesheets, and other functionality. INCLUDEInclude a call to the nav menu THESE,<?php wp_nav_menu(); ?> TOO.
    • footer.php MOST OFTEN,Should include a call to THEMESthe footer before the INCLUDEclosing 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 THEMEScomments template. INCLUDE THESE, TOO.
    • sidebar.php MOST OFTEN,Used to display a sidebar THEMESand its widgetized areas INCLUDE THESE, TOO.
    • functions.php MOST OFTEN,Enable features such as THEMESSidebars INCLUDENavigation Menus THESE,Post Thumbnails TOO.Post FormatsCustom HeadersCustom BackgroundsAdditional Widget Are
    • archive.php MOST OFTEN,Used when a category, THEMESauthor, or date is queried. INCLUDE THESE,Will be overidden if a TOO.category.php, author.phpor date.php template isavailable.
    • category.php MOST OFTEN,Used to display a THEMEScategory archive. INCLUDE THESE, TOO.
    • tag.php MOST OFTEN,Used to display a tag THEMESarchive. INCLUDE THESE, TOO. date.phpUsed to display a datearchive (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@angiemeekerangie@angiemeekerdesigns.com614.353.0633Download sample files:http://goo.gl/IFzhz