When building your WordPress theme, you might have been planning it to be used mainly as a blog theme or perhaps you lean in the web pages direction. Either way, to make a fully integrated WordPress theme, you need to make sure both Pages and Posts are fully supported. And that means you should have a
single.php and a
page.php included in your theme and they shouldn’t look the same.
You may think this is obvious, but I’ve seen many times when a theme is geared just toward web pages or just toward blogs (the most common) and then have a junky default
index.php for handling the other half because the theme wasn’t fully thought through. Posts and Pages are both first-class citizens in WordPress and should be treated that way. And your clients will love you if you do.
What Posts Have That Pages Don’t
Blog Posts need a couple of key elements that Pages shouldn’t have. They are:
- Author Information - Pages shouldn’t have author information listed. It just doesn’t make sense to show author information on a static page that will probably be updated often and have multiple authors. It’s not one person’s ideas, it’s static information for the site.
- Date Information - Pages shouldn’t have when they were first published. Again, Pages could be updated often and having date and time of publication just doesn’t make sense for most Pages.
- Tags and Categories - Pages can’t have tags and categories, so don’t have a place for them on
What Pages Have That Posts Don’t
- Breadcrumbs - Posts don’t have child posts, but Pages can have a parent. A place where you show where this Page lives in the hierarchy of pages will help visitors navigate a complex page structure better.
- Different Navigation Menu - What if your users want a different navigation on their Pages than they have on their Posts? Have a differently named Menu in
page.phpand they’ll have the power to tailor the navigation to their needs depending on where the user is at on their site. This is a very powerful technique that a user of your theme can use to really customize their site and have the site act differently when it’s in Post mode versus Page mode. If they don’t need this feature, they can just assign the same Menu Structure to each Menu, so no harm done.
- Different Widget Areas - Again, if your users want a different experience when someone is on their blog versus their static website, having a differently named Widget Area will help them do that.
Remember, some people may use your theme for a full content management system to run their website and some will use it just as a simple blog. Take the time to care about both uses and you’ll have many more happy customers.