With Tracy Levesque / @liljimmi
I'm going to go through some terms being thrown around on that other track and explain what they are, what they can do, and how to use them.
WordPress uses the Query String — information contained within each link on your web site — to decide which template or set of templates will be used to display the page.
Templates are cool because if you name a template file a certain way, it will automatically apply to a certain page.
There's a chart on WordPress.org that shows how the naming conventions work.
The chart looks confusing, but it's really pretty simple.
Templates are the files in a theme that tell WordPress how to display your pages. They live in the theme's folder.
Templates handle the display of different pages on your WordPress site such as...
If you name template files a certain way they will affect the display of those pages.
Power users - Look for a theme or theme framework that allows you to add/modify templates.
Designers - Make them yourself! Just follow the chart.
The Loop is PHP code used by WordPress to display posts.
The Loop is a set of instructions in a template that grabs content and displays it on a page.
It's called a "loop" because the set of instructions can be repeated multiple times on a page.
Within The Loop are the main parts of a page or post. These are like the slices of bread in our sandwich.
You can also grab additional content, aka Metadata, attached to pages or posts. These are like the ingredients in our sandwich.
In The Loop you can provide instructions that determine which posts are shown.
For example we could have the following instructions:
Custom loop example on the moviefanfare.com site.
Power users - Look for a theme, theme framework or plugin that allows you to modify the display of the posts page.
Designers - Dig into the loop in your theme or child theme and start modifying! Check out The Loop in Action in the WordPress Codex.
A Custom Type is a Post Type you define.
Normally you only have 2 types of content to choose from: Pages and Posts. Guess what — you can make more!
Pages and Posts are both Post Types. They...
So instead of just
You could have
Custom Post Types can also have their own custom taxonomies. That just means they can have their own ways to group posts together.
Categories and Tags are taxonomies for Posts and Pages.
If we created a custom post type called "Movies" some custom taxonomies we could use are
Genre, Year, Director and Rating
With these custom taxonomies you would have archive pages to see all movies by genre, year, etc.
For mystaticguard.com we created 3 custom post types: Products, Stylists and Tips
With Custom taxonomies, The Loop and the WordPress Template Hierarchy, the site is easy-to-manage.
Power users - Use a plugin that allows you to create Custom Post Types.
Designers - Code your own. Really! I have a how-to video on WordPress.tv that shows you how.
Hooks are provided by WordPress to allow your plugin to 'hook into' the rest of WordPress...There are two kinds of hooks:
- Actions: A custom PHP function defined in your plugin (or theme) and hooked, i.e. set to respond, to specific events that take place in WordPress.
- Filters: Functions that WordPress passes data through, at certain points in execution, just before taking some action with the data
Hooks, Actions and Filters allow you to change WordPress functionality without breaking it.
Hooks - Points at which WordPress allows you to tap into a function and safely modify it.
Some examples are:
Actions - A hook that makes something new happen when a WordPress function is triggered.
Filters - A hook that modifies a WordPress function when it is triggered.
Now is when I do my awesome, visual illustration of Hooks, Actions and Filters using a volunteer from the audience.
Hooks, Actions and Filters are what makes WordPress great software for building an amazing site.
Power users - If you've ever installed a plugin you are using them already.
Designers - Dig into the WordPress Codex article on Theme Development and start adding functionality to your themes.
Slides available on Slideshare: slideshare.net/TheTracyL