Your browser doesn't support the features required by impress.js, so you are presented with a simplified version of this presentation.

For the best experience please use the latest Chrome, Safari or Firefox browser.

Use a spacebar or arrow keys to navigate

WV305 WordPress Plugin Development

Session 1

Erick Hitter

cdia@ethitter.com

About Me

Tonight's Objectives

Module Description

Now that the benefits of content management systems are well understood and the foundational technologies of the web are beneath our belts, it's time to take the next step and learn how to customize WordPress to meet the varied needs of our clients. In this module we will explore the feature rich API’s available to developers, and demonstrate how they can be utilized to enhance and expand on the WordPress core code through plugin development.

Module Objectives

Module Deliverable

Build a plugin that leverages WordPress' CMS-focused functionality to manage custom content of some sort

Examples:

Module Deliverable

Guidelines

 

More specifics on this on Saturday. Until then, just think about what you'd like to build.

Installing WordPress

What we need:

  1. A copy of WordPress
  2. A webserver to run it
  3. A database server to hold its content

WordPress.org vs WordPress.com

The source of much confusion

.org

.com

Free to download Nothing to download
Can install themes Cannot install themes, but many are provided for you
Can install plugins Cannot install plugins
Generally must pay to host it somewhere Free for basic capabilities, but upgrades are available
Generally must pay for a domain name Must pay to use your own domain name, even if you already own it

Let's Do This!

WordPress Review

Ask lots of questions now!

It's better to get everyone on the same page early

The Loop

The Loop

<?php
	if ( have_posts() ) {
		while ( have_posts() ) {
			the_post();
		}
	}
?>

The Loop: have_posts()

Serves two purposes:

  1. Tells your code whether any posts matched the query
  2. Enables PHP to loop through those posts

The Loop: the_post()

Sets up Template Tags, such as the_title() and the_content()

Absolutely critical to The Loop. Omitting it has strange effects.

Template Tags

Template Tags: Examples

Template Hierarchy

In other words, how does WordPress decide which template to use where?

Template Hierarchy: The Confusing Answer

Template Hierarchy: The Basic Answer

  1. What type of page is this?
    Homepage, Post, Page, category archive, tag archive, and so on.
  2. Does a template for this type of page exist in the theme?
    home.php, single.php, page.php, category.php, tag.php
  3. If not, use index.php.

How Is WordPress Organized?

Questions so far?