|

Custom Post Types and Other Mysteries

It takes a while to get used to WordPress lingo. What is the difference between a template and a theme? How are custom post types different from custom fields, or post formats for that matter? What are taxonomies? Here are a few brief definitions:

Themes

Themes are the combined templates, functions and styles that together create the look and functionality of your website. You can change themes without losing the content of your website although it might be displayed differently. The current WordPress default theme is Twentyeleven.

Child Themes

Developers sometimes create custom child themes. This means that they will use a pre-existing theme but then build a separately named theme that uses most of the functionality of the parent theme but does some things differently. A child theme may just alter the look of the parent theme or it may also add different functionality.

Templates

Themes consist of a number of different templates. Templates create the layout of each type of pages in your theme.The page template, for example, creates the layout of your page, the category template determines the layout of post when displayed by category.

Post Formats

When you write a post, you will see that to the right of your editor you can select a post format. The post format you select will affect how your post looks when published. Each format uses a different template to create the layout and determines what will be included in the post. If you are using the default theme TwentyEleven, for example, a ‘status’ format will display the text of your post but not the title. It will also display your avatar. If you publish the same text with a ‘standard’ format it will not include the avatar but show the title of the post. you could create different styles depending on the format so that a ‘status’ would have a red background while an ‘aside’ would be blue. Tumblr type blogs take advantage of these possibilities.

Custom Fields

By default each post consists of one text area. You can write different paragraphs and include subtitles but nothing tells you what information should be entered at any given point. This is where custom fields come in. As you are writing your post, you will notice that below the editor is a box that lets you create pairs of information. On the left you create a label such as ‘My Breakfast Today’ and on the right you enter the value, such as ‘Oatmeal’. This will then be displayed as ‘My Breakfast Today: Oatmeal’ at the bottom of your post. When you write your next post you will see that the field is still available and you can enter a new value, such as ‘cold cereal’ which will then show up as ”My Breakfast Today: cold cereal’. I am sure you will find better uses for this than to tell the world what you had for breakfast.

Custom Post Types

Custom post types are for custom content, they give you more control over how blog post information is created and stored. They are not meant as a way to separate or label your posts. That’s what categories, tags and custom taxonomies are for.
You are already familiar with two post types, post and pages. When you create a new custom post type, such as ‘Movies’, you will get a new section in your dashboard title ‘movies’. Custom post types can be hierarchical like pages or non-hierarchical like posts. The editor will look just like the post or page editor, but if you use a custom template the display will look different. A good use for custom posts would be any type of catalog, such as a real estate listings, a movie database or a book directory. Justin Tadlock has written an excellent introduction to custom post types,
href=’http://justintadlock.com/archives/2010/04/29/custom-post-types-in-wordpress’>Custom post types in WordPress.

Custom Taxonomies

There are two types of taxonomies that are already built into WordPress: Categories and Tags. Categories are hierarchical, tags are not. If you are publishing a body of information that you want to be able to catalog separately from your other categories or tags you might want to create a custom taxonomy. Custom taxonomies are often created in conjunction with custom post types. Thus, if you have a movie database as your custom post type you might want to create a ‘genre’ taxonomie to separate horror movies from romantic movies from foreign dramas.

I hope these definitions will help clear up what at first may seem confusing lingo. They are terms that a developer might seem throw around just a bit too much for your taste, but they are also terms that help you understand what is possible with WordPress.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *