Skip navigation

Showing Dates Not Just Times in Your Multi-Post Views

Occasionally when I’m searching the web, I’m looking for timely information such as articles on WordPress 2.1 not WordPress 1.5. Information on the latest version of WordPress would be dated within the past two months or so. Anything before that probably covers early versions of WordPress and wouldn’t apply to the topic I’m seeking.

Example of the time without the date in a blog postMore often than not, instead of the date, I find the time of the post with no date reference obviously visible. What is this? Why bother? Does the time of the post help the reader in any way?

The time and date are part of a post’s meta data and is usually included in the post meta data section at the bottom of the single post view. Some put the date and/or time meta data just above or under the post title, which is appropriate for time sensitive posts. But why do so many WordPress Themes only include the time and not the date?

Example of a date with no year on a blog postOr they will give the date but not the year. That’s not much help either if the “when” is important to the validity of the article.

As I hunt around looking for the date, I will often find it WAY above the title, or at the top of a list of posts on multi-post views like categories, tags, archives, or search results, grouping the resulting posts under a single date. In theory, this is a neat idea, but in practice, how would I know to hunt for the “group date” unless the design format really emphasizes it?

If you write timely posts with “expiration date” content, take time right now to go through the various page views on your WordPress blog to see how the date and time are featured. Are you providing the right information your readers want and need?

Putting the Date Back Into Your Post Meta Data

Example of the date in the post meta data sectionThe date and time are typically part of the post meta data section which is most commonly featured in a container at the bottom of your posts on the single post view. It may include the post categories, author name, copyright statement, and other biographical or blog information.

Why should the reader have to scroll down to the bottom of the post page to uncover the date if the date is so important to the value of the post?

To put the date and/or time up with your post title, you first need to determine when and where you want the date to appear. Is it important to be visible on the front page of your blog? Or only within the archives and search multi-post view pages? Or both? Is it important to see the date on your category page views, giving your readers a sense of how old your posts are in that category?

To add the date to posts featured on the front page of your WordPress blog, you will need to edit the index.php template file in your WordPress Theme. To To add the date to the category and archive page view, you may need to edit the category.php and/or archive.php template. If your WordPress Theme uses the search.php template file, you may need to edit that, too.

To just change how the date is showcased on the single post view, you may have to edit the index.php or the single.php, if your WordPress Theme has a template file to showcase your single post view.

Date Under the Title

The WordPress template tag that handles the date and time on your WordPress Themes is the_date() and the_time(). For information on how to set the date and time in your WordPress blog, see Formatting Date and Time in WordPress.

The WordPress Theme template tags structure for putting the date under the title would be:


<h2 id="post-<?php the_ID(); ?>" class="posttitle"><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<div class="datemeta"><?php the_date(); ?></div>
<div class="authorname">By <?php the_author_posts_link('namefl'); ?></div>


Which would display:


Post Title Something
March 16, 2007
By Sally Smith


Want to add the time?


<h2 id="post-<?php the_ID(); ?>" class="posttitle"><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<div class="datemeta"><?php the_date(); ?> at <?php the_time() ?></div>
<div class="authorname">By <?php the_author_posts_link('namefl'); ?></div>


Which would display as:


Post Title Something
March 16, 2007 at 8:43 PM
By Sally Smith


Date Above the Post Title

To place the date prominently above the Post Title, make sure that the CSS doesn’t put too great a distance between the post title and the date. The date needs to be associated with the post title, so keep it close.

The template code structure would be:


<div class="datemeta"><?php the_date(); ?></div>
<h2 id="post-<?php the_ID(); ?>" class="posttitle"><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<div class="authorname">By <?php the_author_posts_link('namefl'); ?></div>


Depending upon the CSS, it could look like:


March 16, 2007
Post Title Something
By Sally Smith


Date in Newspaper Format

Some bloggers might like the newspaper format and want the post content to start out with the date. The template structure could be:

<h2 id="post-<?php the_ID(); ?>" class="posttitle"><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<div class="authorname">By <?php the_author_posts_link('namefl'); ?></div>
<div class="entry"><span class="datemeta"><?php the_date(); ?>: </span><?php the_content(); ?>...


Which would look like:


Post Title Something
By Sally Smith

March 16, 2007 – The article text would begin here saying something wise and brilliant…


Choose Your Date and Time Format to Match Content and Intent

It’s up to you on how much importance you want to give to the date and time of your blog posts. The more important the time and date of the post, the more prominent this information should be.

You might only want to showcase the month and year and not the day or time at all. If you post timeless posts, then the date isn’t important to the post, thus it can be tucked into the post meta data.

Avoid using the time or the day only. After all, which August 17 was it when you wrote this post?

When you know the role the time and date plays within your blog, feature it appropriately.

Related Articles

Member of the 9Rules Blogging Network


Site Search Tags: , , , , , , , , ,
Feed on Lorelle on WordPress Subscribe Feedburner iconVia Feedburner Subscribe by Email

Copyright Lorelle VanFossen, member of the 9Rules Network, and author of Blogging Tips, What Bloggers Won't Tell You About Blogging.

7 Comments

  1. BONGO MIRROR
    Posted June 25, 2007 at 6:40 am | Permalink

    You are completely right. This is extremely useful and I didn’t notice it until you pointed it out.

  2. Posted June 25, 2007 at 8:02 am | Permalink

    A more interesting problem to me is with sitemap.xml files. If you’ve looked at yours you’ll notice that entries for actual files/folders have a “lastmod” entry (for example: 2006-11-19T07:56:05Z). WP generated entries (pretty much ANY page or post in your blog) do not have these entries. Other than writing a custom version of the google sitemap generator (which could be done) to pull the info out of the DB I don’t see an easy way around this.

  3. Posted June 25, 2007 at 10:16 am | Permalink

    I completely agree with you about showing a full date. I dislike having to figure out whether the post was written in 2006 or 2007. I really appreciate date and name based Permalinks.
    Whenever I am reading blogs I immediately want to know when a post was written. That is why I prefer a post date near (below/next to) the post title on both the front page view AND the single post view.

  4. Posted June 25, 2007 at 10:38 am | Permalink

    I guess I never really thought about this much either. Well, at least as it relates to display on the page. The themes we started working from as we modified, to get to our current themes, which are pretty much completely customized, all had the date and time code in the post meta footer areas.

    My personal challenge regarding this concept, however comes with me being able to quickly scan a Search Engine Results Page (SERP) for time relevant results. Google doesn’t show helpful information like when the page was indexed, or last updated, so unless the site’s operators are allowing the permalink structure to show dates (like Lorelle’s site here tells me that this post was created June 25th, 2007) I have to “take the risk” that a helpful post title will give me relevant answers.

    For these reasons, other research and gut feelings, at BoldlyGoing.com and AreYou.BoldlyGoing.com we have decided to set up what we believe to be an effective permalinking structure that will give (people like me) visual clues as to date relevancy on the SERP’s, and may (or may not, who really knows) better ranking on those same pages.

    We’ve gone to one directory level with the year/month/date. It actually would look more like this in the URL: bg.com/2007_06_25/post-title-goes-here/ There’s some speculation that dashes are used by the algorithm to separate words, while underscores “_” simply extend a word (meaning that it is all “one” word, not split up words). There are also believers out there that the closer your post page is to the top of your directory tree, the better it ranks. 4 directories down is where the post on this page appears to the spiders. Not sure I believe this makes a difference, but if it does…

    Finally, some SEO folks think that the date directory structure is not needed and may hurt results. Again, not sure I believe that, but if it does, we felt that going with the entire date structure in one directory, and underscored vs. dashed was the way to get the good visual information into the URL so we could be just that much more relevant for the folks that find our links in the search engines.

  5. Posted June 25, 2007 at 1:14 pm | Permalink

    Thankfully the dates on my posts don’t really matter. The closest is with my radio site, where I obviously can’t have a song in a show from 2006 when that song wasn’t even written until 2007. I’m hoping that the year and month permalink structure will take care of that.

    As for my photoblog, I’ve toyed with the idea of removing all mentions of a date alltogether. Since all I have for each post is a photograph I’m not sure that the date is something that the reader even needs to see.

  6. Posted June 25, 2007 at 10:58 pm | Permalink

    I’m using the time stamps on my site as well, down to the seconds. Do you think that’s a little excessive though? :-)

    Seriously, my permalinks contain the date, category, as well as the post title. I think this results in the best combination permalink, and Google certainly seems happy with it. Ironically enough I was forced to keep my permalink structure set up like this, otherwise several of my plugins crucial for my blog would break.

    I’ve been debating whether to remove time stamps altogether, but the reality is some of my content can still be considered time based, and without leaving a date it could likely mislead the reader. I’m not sure leaving it in just my permalink would be enough.

  7. hheide
    Posted June 26, 2007 at 1:45 am | Permalink

    When I started my blog I had the date in my posts. But after Problogger had an article about dates I thought about it for a while.
    My blog is about my growth as an artist. It doesn’t matter so much that I used some technique three months ago as that learning a technique changes the way I draw my pictures.
    I think the order of posting is a lot more important than the date of the posts. So I removed the dates.


3 Trackbacks/Pingbacks

  1. [...] Showing Dates Not Just Times in Your Multi-Post Views [...]

  2. […] Showing Dates Not Just Times in Your Multi-Post Views […]

  3. […] Showing Dates Not Just Times in Your Multi-Post Views […]

Post a Comment

Follow

Get every new post delivered to your Inbox.

Join 20,569 other followers

%d bloggers like this: