Get a free year on Tuts+ this month when you purchase a Siteground hosting plan from $3.95/mo
Human or crawler, a visitor needs to find where your post belongs. Even if you have category or tag archives, it's almost always a necessity to include a section to display a little bit information for the content.
In this post, we're moving on with our series with the "post meta", the identity card of the post.
"Post Meta" to Help People (And Crawlers) Find Their Way
While a "related posts" section is the most effective way to offer people relevant content, it's also good practice to serve the information of the post's categories, tags, publishing date and so forth - both for humans and search engine spiders.
Why Use a "Post Meta" Section?
I don't know if you have ever done this, or have seen someone else do it, but sometimes people like to consume the content of a website as a whole.
You might have come across some weird data in your website's statistics, which showed that one visitor (or a couple of visitors) spent over 3 hours on the website. If you have good content, the chances are higher to see weird data like this in your website's stats.
This kind of content consumer is the kind who will constantly share your posts and talk about your website. You must care about these people the most and in order to help them spend hours in your website, you must provide them with a well structured post meta section.
The same goes for "normal" visitors: They might be interested in other posts from the same category or author, or they might want to know when the post was published. Also, of course, search engines always need information to categorize and structure your website's page listings.
Creating a Strong "Post Meta" Section
In order to serve a "post meta" section with good quality, we must think of what it should consist of. Off the top of my head, I can list a couple of items:
- The author of the post (with a link)
- The categories that the post is in
- The tags the post has
- The publish date of the post
- A link to edit the post (for admins and authors, of course)
This is not a section that requires attention, so there's no need to shine through - three lines is enough for the post meta, I think. So, if we put them together, we can build something like this:
<div class="post-meta"> <div class="author-date">This post was written by <?php the_author_link(); ?> on <?php the_date(); ?>.</div> <div class="categories">Categories: <?php the_category(); ?></div> <div class="tags">Tags: <?php the_tags(); ?></div> </div>
Done! Simple and effective.
Yes, content may be "king" but a lonely king is a weak king, and people might not respect that "king".
We now know the essentials of the "post meta" section - why use it and how to use it effectively. If you have anything to say, please share your comments with us!