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.