• Save

Loading…

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

Like this presentation? Why not share!

WordPress Themes and Plugins

on

  • 1,587 views

A basic introduction for web developers.

A basic introduction for web developers.

Statistics

Views

Total Views
1,587
Views on SlideShare
1,587
Embed Views
0

Actions

Likes
1
Downloads
0
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

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
  • For web developers who are familiar with WordPress and want to get started with their own themes and plugins
  • YAY for open source!Everything I know I learned from the interwebs!Keep in mind:- WordPress is evolving RAPIDLY! If you want to know where it's going, you can find information on WordPress.org and even check out the WordPresstrac.- Random info/code on the web can be out of date or just plain wrong... always test, keep/make backups, and/or use version control.
  • Don’t be intimidated by a little bit of code! Copy and paste away, experiment with editing, and maybe you’ll learn something… A little goes a long way!
  • Oh good, I already know those stuffs! Now what are my options?Use an existing theme framework or parent theme to make a child themeModify an existing theme (make sure the license allows this... many do!)Writing a theme from total scratch without any copying and pasting is just plain silly! At least copy and paste the loop!
  • Do you like what’s already there?How familiar are you with it?How much customization do you need?Do you need WordPress widget support?Is it compatible with plugins you want to use?How many themes are you going to make?Should I modify a theme or build a child?Watch out: random themes may have bugs or just not work as advertised, code might not be easy to follow or modifySupport network: free/paid access to forums and lists, paid development servicesIs the code commented/self-explanatory? Is it valid XHTML? Cross-browser compatible? Is there an active, helpful, and enthusiastic community for support? Does the framework build upon WordPress’ existing standards or will I have to learn a whole new set of functions? How long will it take me to get up to speed? Does the framework do too much more than I need? Not enough?For best (quick) results: Choose a popular, well-tested theme or framework
  • A separate WordPress theme that works in conjunction with and builds off of an existing parent theme, using as much or as little of the parent theme's styles, templates, and functions as you want it to!You need to have the parent theme installed in order for the child theme to work (the child theme must be the activated theme).New in 2.7: Override parent templates and add new custom templatesChild themes are definitely sounding more interesting these days… but are they really the answer?New in 2.7: Override parent templates and add new custom templates (previously limited to CSS and functions)YAYs: Leverage parent theme upgrades without having to update your own custom theme.Oh noes: If you do major customization and override a lot of templates, there may be little to leverage in the parent theme.Upgrades to the existing theme (adding features, enabling future WordPress compatibility, etc.) may still have to be merged into your customized one.
  • Child theme: Better for those who want to rely on the parent maker for upgrades and need less customization (best if you can do almost everything through CSS or PHP functions/plugins).Modifying: For those who need more customizationto the various templates. Less to learn and less files to manage, so everything’s a bit more straightforward.Remember that themes may not always be standards compliant or fully supported by the latest WordPress release. This is why I often start with a cleaned up version of the default theme, Kubrick.Personal opinion: I don’t want to learn a new complicated framework, I just want to support the WordPress core and would rather spend my time keeping up and learning to do more with it. Plus I don’t want any extra bloat in my theme. HOWEVER, if WordPress came out with an official theme framework as part of the core distribution then I’d probably jump on it! I usually either start with a theme the client has picked out and do as much customization as necessary, or when starting with a photoshop template I directly modify a blanked out WordPress default theme. I sell my support and customization services usually on an hourly basis and all of the sites are different. If a client wants an upgrade to a newer WP, then it’s beneficial to me that they pay for it! So it also depends on your business model.
  • Stylesheet (style.css) – Know your CSS!Template files – Site markup and a bit of PHPFunctions (optional: functions.php) – Write custom PHP code to add functionality, features, and services to your theme!
  • WordPress loads the appropriate template and sets certain variables based on the query stringIn your template, you need to write code that gets the content through these variables… eg. on most pagesyou’ll be iterating through an array postsAND you also need to write the site markup to display this content on the pageHeader, footer, sidebar, comments
  • Header/logo image – upload an image into the theme directory, adjust markup in header.php, and style with CSSHorizontal page menu – call WP function wp_list_pages(‘title_li=‘) in header.php and style with CSSFooter – adjust markup in footer.php and style with CSSEven if you are new to themes, if you know CSS you can already do a lot just by editing stylesheets!
  • What CAN’T you do? You can make your site do almost anything!Any function in functions.php can be written as a plugin (and vise versa)If the function only makes sense in your theme, then it’s probably better to put it in functions.phpMain reason to make it a plugin: Share your super useful and cool functions across themes and with others!For those who know PHP or aren’t afraid of it!Override pluggable.php functionsUse WordPress filters to manipulate dataUse WordPress action hooks to run custom code where you want itUse built-in WordPress functionsAccess the database (using WordPress functions, of course)Connect WordPress to other applications and servicesFor example, I use my WordPress website to refresh profile boxes on my Facebook app more or less hourly, because Facebook caches the content otherwise.
  • Sometimes all you need is to be able to understand what a piece of code does to use it. What’s the point in doing something someone else has already done? At the very least you can check out the options, and if you feel like it, you can do it yourself better!

WordPress Themes and Plugins WordPress Themes and Plugins Presentation Transcript

  • WordPress Themes and Plugins
    A basic introduction for web developers
  • Use free resources!
    WordPress Codex: http://codex.wordpress.org
    Source code of other themes, plugins, and the WordPress core
    Search the internet!
    WordPresssupport forums on WordPress.org: http://wordpress.org/support/
  • I want a custom theme! What skills do I need to have?
    CSS
    (X)HTML
    Image editing (only if you plan on having any images and they’re not already ready to go)
    Copy and paste!
  • Good to know:
    PHP
    MySQL
    Javascript/jQuery
  • Theme options
    Make a child theme
    Modify an existing theme
    Write your own new theme (or framework) from scratch with lots of copying and pasting!
  • Things to look for when researching existing themes and frameworks
    Design and layout
    Ease of use and quality of code
    Documentation
    Dependencies
    Efficiency
    Support network
    Theme/framework/author reputation
    Internationalization support
  • Child themes
    The good: Leverage parent theme upgrades
    The bad: Doing major customization may mean there might not be much to leverage!
  • Building smarter, faster, better!
    Child theme: for those who want to rely on the parent maker for upgrades and need less customization
    Modifying: for those who don’t care about upgrades, want a simpler structure, and need more customization
  • What is a WordPress theme?
    Stylesheet (style.css)
    Template files
    Functions (optional: functions.php)
    /*
    Theme Name: MyTheme
    URI: the-theme's-homepage
    Description: a-brief-description
    Author: your-nameAuthor
    URI: your-URI
    Template: use-this-to-define-a-parent-theme—optional
    Version: a-number--optional.
    General comments/License Statement if any..
    */
  • WordPress template hierarchy
  • Quick, easy, and effective theme customizations
    Header/logo image – header.php
    Page menus – WP functions: wp_list_pages, wp_page_menu, wp_nav_menu
    Footer – footer.php
    Style everything with CSS!
  • What can I do with functions.php and plugins?
    Write any custom code!
    Override pluggable.php functions
    Use WordPress filter and action hooks
    Access the database (using WordPress functions, of course!)
    Connect WordPress to other applications and services
  • Plugins (and theme functions) don’t have to be complicated!
    Your coding skill can range from non-existent to expert (REALLY!)
    Search, research, and make liberal use of your copy and paste skills
    /*
    Plugin Name: Magic Plugin
    Plugin URI: http://example.com/magic-plugin
    Description: Magic Plugin performs magic
    Version: 2.3
    Author: Mr. MagicAuthor
    URI: http://example.com/
    */