what you don't know you can do -- wordpress development for absolutely everyone!

Post on 27-Jan-2015

103 Views

Category:

Technology

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

Do you think tapping into “advanced” WordPress functionality is only for developers? Power users and designers can build a site that takes advantage of all that WordPress has to offer. Learn about Templates, Custom Post Types, Custom Taxonomies, The Loop, Hooks, Actions & Filters and how power users and designers can use them to build a great site with custom functionality.

TRANSCRIPT

What You Don't Know You Can Do — WordPress Development for Absolutely EveryoneTracy Levesque • • @LilJimmi tracy@yikesinc.com

What You Don't Know You Can Do

WordPress Development forAbsolutely Everyone

With Tracy Levesque / @liljimmi

Hi, I'm Tracy.

I am a Power User

I know HTML

I know CSS

I don't know PHP

There are many folks with skill setssimilar to mine.

And we can develop for WordPress, too!

WordPress Development

Demystified!I'm going to go through some terms being thrown aroundon that other track and explain what they are, what they

can do, and how to use them.

The WordPressTemplateHierarchy

The WordPress Template Hierarchycodex.wordpress.org says:

WordPress uses the Query String — informationcontained within each link on your web site — todecide which template or set of templates will be

used to display the page.

The WordPress Template HierarchyTranslation

Templates are cool because if you name a template file acertain way, it will automatically apply to a certain page.

There's a that shows how the

naming conventions work.

chart on WordPress.org

OMG

The WordPress Template HierarchyWhat it is

The chart looks confusing, but it's really pretty simple.

The WordPress Template HierarchyWhat it is

Templates are the files in a theme that tell WordPresshow to display your pages. They live in the theme's folder.

The WordPress Template HierarchyThey're like different frames for your content

The WordPress Template HierarchyWhat it is

Templates handle the display of different pages on yourWordPress site such as...

The main list of posts (the blog page)A regular pageAn archive page (Category, Tag, Author, Date pages)A single post pageThe search results pageEtc...

The WordPress Template HierarchyWhat it can do

If you name template files a certain way they will affectthe display of those pages.

The WordPress Template HierarchyTwentytwelve example

The WordPress Template HierarchyHow you can use it

Power users - Look for a theme or theme framework thatallows you to add/modify templates.

Designers - Make them yourself! Just follow the chart.

The Loop

The Loopcodex.wordpress.org says:

The Loop is PHP code used by WordPress todisplay posts.

The LoopTranslation

The Loop is a set of instructions in a template that grabscontent and displays it on a page.

It's called a "loop" because the set of instructions can berepeated multiple times on a page.

The LoopThe Loop is like making sandwiches.

The LoopTo make a sandwich you collect a set of ingredients

and assemble it

The LoopYou repeat the steps of collecting and assembling as

many times as needed

The LoopWhat it is

Within The Loop are the main parts of a page or post.These are like the slices of bread in our sandwich.

TitleContent

The LoopWhat it is

You can also grab additional content, aka Metadata,attached to pages or posts. These are like the ingredients

in our sandwich.

AuthorDateFeatured ImageCategories (posts only)Tags (posts only)Etc.

The LoopWhat it is

In The Loop you can provide instructions that determinewhich posts are shown.

For example we could have the following instructions:

Only show posts from the "Pets" categoryIf a post is tagged "kittens" add a special style to itIf a post is tagged "dogs" don't show it

The LoopWhat it can do

Custom loop example on the site.moviefanfare.com

The LoopHow you can use it

Power users - Look for a theme, theme framework orplugin that allows you to modify the display of the posts

page.

Designers - Dig into the loop in your theme or childtheme and start modifying! Check out

in the WordPress Codex.The Loop in Action

Custom PostTypes

Custom Post Typescodex.wordpress.org says:

A Custom Type is a Post Type you define.

Custom Post TypesTranslation

Normally you only have 2 types of content to choosefrom: Pages and Posts. Guess what — you can make

more!

Custom Post TypesWhat they are

Pages and Posts are both Post Types. They...

Are types of content with their own sets of fieldsHave their own admin area in the WordPress adminLet you add content in a repeating and consistentmannerHave a consistent layout (by default) on the front-end ofyour site.

Custom Post TypesWhat they are

So instead of just

You could have

Custom Post TypesReally, the possibilities are endless

Custom Post TypesWhat they can do

Custom Post Types can also have their own customtaxonomies. That just means they can have their own

ways to group posts together.

Categories and Tags are taxonomies for Posts andPages.

Custom Post TypesWhat they can do

If we created a custom post type called "Movies" somecustom taxonomies we could use are

Genre, Year, Director and Rating

With these custom taxonomies you would have archivepages to see all movies by genre, year, etc.

Custom Post TypesStatic Guard example

For we created 3 custom post types:

Products, Stylists and Tips

mystaticguard.com

Custom Post TypesStatic Guard example

With Custom taxonomies, The Loop and the WordPressTemplate Hierarchy, the site is easy-to-manage.

Custom Post TypesHow you can use them

Power users - that allows you to create

Custom Post Types.

Use a plugin

Designers - Code your own. Really! I have that shows you how.a how-to video on WordPress.tv

Hooks, Actionsand Filters

Hooks, Actions and Filterscodex.wordpress.org says:

Hooks are provided by WordPress to allow yourplugin to 'hook into' the rest of WordPress...There

are two kinds of hooks:Actions: A custom PHP function defined in yourplugin (or theme) and hooked, i.e. set torespond, to specific events that take place inWordPress.Filters: Functions that WordPress passes datathrough, at certain points in execution, justbefore taking some action with the data

Hooks, Actions and FiltersTranslation

Hooks, Actions and Filters allow you to change WordPressfunctionality without breaking it.

Custom Post TypesWhat they are

Hooks - Points at which WordPress allows you to tap intoa function and safely modify it.

Some examples are:

Changing the length of the excerptChanging the order of menu items in the adminAdding content to the beginning or end of every postAdding Custom Post TypesAdding Sidebars

Hooks, Actions and FiltersWhat they are

Actions - A hook that makes something new happenwhen a WordPress function is triggered.

Hooks, Actions and FiltersWhat they are

Filters - A hook that modifies a WordPress function whenit is triggered.

Hooks, Actions and FiltersWhat they are

Now is when I do my awesome, visual illustration ofHooks, Actions and Filters using a volunteer from the

audience.

Hooks, Actions and FiltersWhat they can do

Hooks, Actions and Filters are what makes WordPressgreat software for building an amazing site.

Hooks, Actions and FiltersHow you can use them

Power users - If you've ever installed a plugin you areusing them already.

Designers - Dig into the and

start adding functionality to your themes.

WordPress Codex article on Theme Development

Resources - The #1 place to find the best

WordPress development information. - From the

Codex - A handy

site that creates CPT code for you. - A list of

theme frameworks that allow power users to createextended functionality for WordPress.

The WordPress Codex

WordPress Terminology Related to Design

WordPress Custom Post Type Generator

Guide to WordPress Theme Frameworks

THE ENDQuestions?

Slides available on Slideshare: slideshare.net/TheTracyL

top related