Using WordPress: Content
This chapter is all about words—specifically, putting words onscreen that will become the content for your website. We’ll cover how the Post and Page editors are the same—and how they’re different. We’ll cover what Posts and Pages are, and why I keep referring to them separately (and why I also talk about pages with a lowercase “p”). We’ll talk about categories, tags, and how to use them to organize your content throughout your site. If you need to move your content to another site, or bring another site’s content into yours, we’ll get to that, too. Finally, we’ll wrap up with managing comments, because although not specifically content-related, comments are tied to the content, so it makes sense to talk about them. Before we get to how to create content in WordPress, let’s talk about the main types of content: Posts and Pages.
Posts, Pages, Custom Post Types, and Post Formats Explained
There are two basic types of content in WordPress: Posts and Pages. All other kinds of content are derived from one of those two types (generally Posts). So what are Posts and Pages (and why do I keep capitalizing them!)? Let’s start with Posts.
Posts: Also Known as the Blog Post, But More
When WordPress first came out, the only content type was a Post. That was the way a lot of blogging tools worked back in 2003 when WordPress 0.75 came out. A post was, essentially, a blog post. A piece of content that was intended to be a part of a much larger whole—a blog. It’s that sense of connectedness that is essential to understand posts. Posts are always connected to each other. All posts are connected to each other by time, and we can see this through the time-based archives within WordPress (day, month, year). You can go back and page through all the posts you’ve written (and published), based on when they were published. Posts are also connected by author, category, and tag. However, if more than one person is writing on a site, each post could have different authors, categories, or tags from any other post; you can’t say that all posts are connected to each other this way. Just to make things a little more confusing, all posts must be in at least one category. Remember in Chapter 6, “Setting Up your WordPress Site Right the First Time,” that when we looked at the Writing settings, there was the Default Category, and it was set to Uncategorized. That’s it. If you don’t assign a post to a category when you publish it, it will be assigned to the default category. This is, by the way, why we’ll edit the name of the default category to something (anything) other than Uncategorized. If you forget to assign a post to a category, the default category should at least be something meaningful.
Okay, let’s recap. Posts are content that are connected to each other through time (all posts), category, tags, and author. That’s the key. Posts are pieces of content that have a relationship to other pieces of content. You can always look at the “Archive” page for an author, category, tag, or date and see all the Posts that match those conditions. “Archive” is in quotes because it isn’t so much an “archive” as storage as it is “archive” as a list. Being able to list all the posts of one particular type is very, very powerful and allows you to do some very clever things with your content. Later in the chapter, I’ll talk about these clever ways to organize your content using posts and pages (and other content types). This is very important to think about if you’re using WordPress to build a website. Now let’s talk about pages.
Pages: Standing Alone with Purpose
Pages are what people tend to think of as “regular web pages.” They are intended to be (relatively) static and can stand alone and still have context and meaning. The best examples of pages are the About Me and Contact pages. If you get to those pages on a site, they make sense all on their own. They don’t need any other pieces of content for context or to make sense. Pages can’t be assigned to a category or tag, and although pages do have published dates and authors, you can’t look at all pages in a list (easily) using either of those. Pages aren’t just boring old content, though. They have tricks of their own—page templates. Page templates are used to do things like have content without sidebars, have a Page that displays Posts, and many other cool things we’ll see throughout this chapter and book. The catch is that Page templates are defined by the theme you’re using. Some themes have lots of Page templates; others only one (the default one). Pages were developed as a response to WordPress users who wanted content that could stand alone outside of the stream of blog posts and maintain a place in the site. We all wanted Contact and About pages that we could keep outside of the flow of posts and be used for content that didn’t match up nicely with what a blog post was or is. Pages were also the first things to be pulled into the early ways we handled menus. The reasoning is that we wanted people to read our posts, but the pages were the extra information (About, Contact, Downloads, Hiring) that visitors wanted to know as well. Then people wanted to use WordPress to make “traditional websites” and things got really interesting, but that’s a story for Chapter 17, “Advanced WordPress Settings and Uses.” Now what if you’d like content that looks, works, and behaves like a post, but not in the stream of blog posts? Content that is contextually linked, but as you create more content, it doesn’t clutter up your stream of carefully crafted blog posts? That is why and how Custom Post Types were developed and added to WordPress.
Custom Post Types: Pulling Posts Out of the Blog Stream
WordPress 3.0 (Thelonious) didn’t just bring in menus, new admin interfaces, and other changes; WordPress 3.0 also introduced Custom Post Types to the WordPress community. Custom Post Types are pieces of content that work and behave like posts, but they don’t appear in your “regular” stream of posts. For example, you want to add testimonials, happy customers gushing about you and your company, to your site. It makes sense to have those as posts because you can easily put all testimonials in a Testimonials category and point visitors to something like http://abgwp.trishusseyc.om/archive/testimontials (or just /testimonials if you use WordPress SEO and set it up to do that—see Chapter 7, “Setting Up Your WordPress Site the Right Way: SEO, Social Media, and More”) to read all the testimonials. However, you also have a blog, and if you created each testimonial as a Post—even under a single category like Testimonials that blog posts never used—visitors (and search engines) could see the testimonials mixed in with blog posts. Not terrible, but it makes for a messy content listing. Also, you can’t just point visitors to a menu or link to all your posts without doing something like making sure all posts are always in one particular category (as well as others) that you can use for navigation. But this approach, relying on people to remember to always set a specific category, is doomed to fail at some point. Someone will forget to set the right category (even if it’s the default one) and will wonder why their post isn’t listed on the blog, and you’ll have to look to see they missed the check box.
Right—messy and annoying. By using Custom Post Types, this isn’t an issue at all. Blog posts are created as posts and you can use any of the ways—including the default ones—to list the posts for people to read. Testimonials have their own, separate way of being displayed and listed. Nice, neat, and simple. Some of the original explanations of Custom Post Types talked more about needing specific types of posts and how to organize them (with their own category and tag tools), but in the three years since WordPress 3.0 came out, the most popular use to Custom Post Types I’ve seen is being able to pull postlike content (content that is connected to each other) out of the regular blog stream. We’ll talk more about setting up Custom Post Types and how to incorporate them into your blog in Chapter 16, “Customizations Without (Much) Coding.” You’ll find themes and plugins create Custom Post Types to work their magic (like Testimonials and Slideshow plugins), so you’re likely to come across Custom Post Types and not even know it!
Post Formats: Styling Posts in New Ways
WordPress 3.1 (Reinhardt) brought in a new way to style posts: Post Formats. Post Formats are designed to allow theme designers to provide ways to offer quick, styled ways of presenting content. Formats such as asides, quotes, images (where the entire Post is a single image), and image galleries are some of the default Post Formats WordPress starts with (themes and plugins can create their own, as well). You can read the (somewhat geeky) explanation on the WordPress Codex (http://codex.wordpress.org/Post_Formats), but essentially, Post Formats created a standardized way to let WordPress users have a similar experience as Tumblr (www.Tumblr.com), which is a hosted blogging service that focuses on the idea of post formats as a way to style content in different ways. So if you have a quote you’d like to share, it might have a nice big quote mark image at the top; maybe the text is in a nice italic font, and there is space at the bottom for who said the sage words. Photo galleries, asides, even Twitterlike status updates—each has a style that reflects and displays that content in the best way possible. The important thing to understand is that Post Formats are not a separate kind of post, just a different way to style it. You can even have Post Formats for Custom Post Types! Remember that Post Formats are just and only that—formatting, style, and layout for regular posts.
These are the basic types and kinds of content in WordPress. They sound a lot more complicated than they really are. Just remember: Pages stand alone, posts are connected, Custom Post Types are a special kind of post separate from your blog posts, and Post Formats make posts look cool. Now that we have that straight, let’s look at how content is created: the Editor.