Dissecting WordPress Themes Part 6: Tag Hierarchy

We continue our exploration of the WordPress archive template hierarchy with a look at tags. The tag hierarchy is very similar to the category hierarchy with templates for all tags (tag.php) as well as specific tags (tag-[id].php and tag-[slug].php). We begin by adding tags to the database and then assigning them to our existing posts and custom post type. We then exercise the tag hierarchy level-by-level showing how more specific templates override more general templates. We then wrap up with a short demo of adding a tag cloud to our footer.php.

Dissecting WordPress Themes Part 5: Category Hierarchy

This article begins our tour of the archive template hierarchy with a look at the category archives. We begin by adding categories and assigning them to our existing posts. We then start at the root of the archive hierarchy with archive.php and continue with the category-specific template, category.php. We also take a look at the individual category templates based on category ID and slug. Along the way we’ll visit the parent/child relationship inherent in the category taxonomy and see how easy it is to add an independent list of categories to our sidebar.php template.

Dissecting WordPress Themes Part 4: Attachment Hierarchy

You can attach files of pretty much any type to your WordPress posts and pages. Once attached, files can be viewed or downloaded directly from a post or through attachment pages that can be formatted any way you want in your theme. In this article we continue our exploration of the WordPress Template Hierarchy for attachment pages. The attachment page hierarchy builds off of single.php to include levels for generic attachments and several media type patterns based on MIME type and subtype. We’ll visit each of these template files using files of various media types that we upload to the Media Library.

This article will teach you how to attach files. If you want to learn how to attach babies (MIME type human/infant), visit MilkyWayBreastfeeding.com.

Dissecting WordPress Themes Part 3: Single-Post Hierarchy

The WordPress Template Hierarchy allows selective, dynamic replacement of generic template files with more specific template files by just creating them in the theme directory. In this article we’ll begin our exploration of the template hierarchy for single posts, post formats, and custom post types. We will create a functions.php file, where we’ll utilize a few action hooks in order to implement post formats and a custom post type. We’ll also show how to integrate the custom post type into our main post stream.

Dissecting WordPress Themes Part 2: The Loop

We continue our series on understanding themes by learning about the famous WordPress Loop. The Loop is responsible for retrieving posts from the database and displaying them on a web page. In addition to coding a basic Loop, we’ll look at several more template tags, style sheet linking, a few important WordPress configuration settings, and page navigation.

Dissecting WordPress Themes Part 1: Creating a Theme

The WordPress Theme is the skeleton and skin of your web site. Like a skeleton, a theme’s template files determine the structure of a site’s pages. And like skin wrapped around the skeleton, a theme’s style sheet determines its aesthetics. In the first article of this series on dissecting WordPress themes, we develop a simple “Trace” theme to aid in understanding the mechanics of the theme architecture and algorithms. We’ll look at what constitutes a valid theme and put together a few simple template files to build a valid HTML page. Regardless of your development language and platform, software development is aided in many ways by using a robust Integrated Development Environment. In this series I’ll be using my favorite open source IDE, NetBeans.