Principles of WordPress
     Theme Design
Template Files
StyleSheet
• style.css
• The only required file
• Includes Headers that will be used by
     WordPress
/*
Theme Name: Custom Theme
Theme URI: http://emmense.com/
Description: A Child Theme of Twenty Ten
Author: Aaron Brazell
Author URI: http://technosailor.com
Version: 1.0
Parent: twentyten
*/
Most Common
            Templates
•   index.php      •   functions.php

•   single.php     •   archive.php

•   comments.php   •   search.php

•   header.php

•   footer.php

•   sidebar.php

•   page.php
Other templates
•   category.php     •   category-x.php

•   tag.php          •   tag-x.php

•   taxonomy.php     •   taxonomy-x.php

•   attachment.php   •   author-x.php

•   author.php       •   404.php

•   page-x.php
Template Hierarchy
Theme Frameworks
Why use a Theme
     Framework?
• Themes present content according to the
  desires and tastes of the designer
• Frameworks provide an extensible way of
  empowering designers within a set of
  guidelines.
Why use a Theme
     Framework?
• Frameworks realize the principle of
  separation of content and presentation
• Early Predecessor: CSS Zen Garden
• Change a theme using only CSS. No
  markup modifications
Hybrid
• Hybrid (http://themehybrid.com)
• Templates for everything
• Admin Pages for content control
Thematic
• Thematic (http://themeshaper.com/thematic/)
• Focuses on Widget Areas and Grid layout
• Modify EVERYTHING via CSS
Carrington
• Carrington (http://carringtontheme.com/)
• Most Robust: Focuses on Typography,
  semantic markup and Ajax
• Includes a Mobile Theme
Best Practices
Use Hooks In Themes

• Let plugin devs build for your template
• Add filters and actions throughout themes
• Examples:
 • do_action(‘before_content’);
 • apply_filters(‘logo’, ‘logo.jpg’);
Internationalize!
• Internationalization (i18n) is important
• Use load_theme_textdomain() in
    functions.php
• Utilize __(), _e(), _c() and _x() to provide
    translatable strings
• Don’t forget the .po file
•   More info: http://codex.wordpress.org/I18n_for_WordPress_Developers
Essential Plugins
Essential Plugins for Any
    WordPress Blog
• Headspace 2 SEO (http://wordpress.org/
  extend/plugins/headspace2/)
• Akismet (http://wordpress.org/extend/
  plugins/akismet/)
• MobilePress (http://wordpress.org/extend/
  plugins/mobilepress/)

American University WordPress Theming Lecture

  • 1.
  • 2.
  • 3.
    StyleSheet • style.css • Theonly required file • Includes Headers that will be used by WordPress /* Theme Name: Custom Theme Theme URI: http://emmense.com/ Description: A Child Theme of Twenty Ten Author: Aaron Brazell Author URI: http://technosailor.com Version: 1.0 Parent: twentyten */
  • 4.
    Most Common Templates • index.php • functions.php • single.php • archive.php • comments.php • search.php • header.php • footer.php • sidebar.php • page.php
  • 5.
    Other templates • category.php • category-x.php • tag.php • tag-x.php • taxonomy.php • taxonomy-x.php • attachment.php • author-x.php • author.php • 404.php • page-x.php
  • 6.
  • 7.
  • 8.
    Why use aTheme Framework? • Themes present content according to the desires and tastes of the designer • Frameworks provide an extensible way of empowering designers within a set of guidelines.
  • 9.
    Why use aTheme Framework? • Frameworks realize the principle of separation of content and presentation • Early Predecessor: CSS Zen Garden • Change a theme using only CSS. No markup modifications
  • 10.
    Hybrid • Hybrid (http://themehybrid.com) •Templates for everything • Admin Pages for content control
  • 11.
    Thematic • Thematic (http://themeshaper.com/thematic/) •Focuses on Widget Areas and Grid layout • Modify EVERYTHING via CSS
  • 12.
    Carrington • Carrington (http://carringtontheme.com/) •Most Robust: Focuses on Typography, semantic markup and Ajax • Includes a Mobile Theme
  • 13.
  • 14.
    Use Hooks InThemes • Let plugin devs build for your template • Add filters and actions throughout themes • Examples: • do_action(‘before_content’); • apply_filters(‘logo’, ‘logo.jpg’);
  • 15.
    Internationalize! • Internationalization (i18n)is important • Use load_theme_textdomain() in functions.php • Utilize __(), _e(), _c() and _x() to provide translatable strings • Don’t forget the .po file • More info: http://codex.wordpress.org/I18n_for_WordPress_Developers
  • 16.
  • 17.
    Essential Plugins forAny WordPress Blog • Headspace 2 SEO (http://wordpress.org/ extend/plugins/headspace2/) • Akismet (http://wordpress.org/extend/ plugins/akismet/) • MobilePress (http://wordpress.org/extend/ plugins/mobilepress/)