Question:I’ve noticed that when I browse a search results page, I am biased against older results. Most of the time, a post that is dated from years ago doesn’t seem like it would have up to date and relevant information.
So how would I go about hiding the date on search engine results pages (SERPs) for my own blog in an effort to improve click throughs?
There does seem to be two types of people who browse search results: those that care about the date and those who don’t. To be honest, it does depend upon your niche, as dated information is more of a negative for a tax site compared to a gardening site. If the information is really out of date, you should consider revising the post. But there’s definitely is a bias in the minds of many of your visitors against dated information, even if it’s still good. In WordPress, you can hide the dates by selectively editing your single.php file.
Hiding the Date for Older Posts
To hide the date in our posts, you need to stop WordPress from printing the date.
- Locate where in your theme the following function resides:
the_time();
This could be in your single.php or even index.php, depending on your theme.
- Conditionally stamp the date only if posts are more recent than “x” days old. For example, to only show date stamps on posts less than a year old, use:
<?php if(strtotime( get_the_date() ) > strtotime( "365 days ago" )) { the_date(); } ?>
There’s also a way to selectively keep dates on some posts.
Hiding Dates is somewhat of a messy solution
Already you have to edit some of your theme files, but you’re not done. People can still tell when your post was published by looking at the dates on the comments. You can get rid of dated comments by editing out either of the following in your comments.php file of your theme:
comment_date()
or
the_time()
Keep in mind that dates still be displayed on your archive and other index pages, but you can noindex these pages such that the only people who see them are visitors who directly navigate there through your menus. Also, make sure that your permalinks aren’t showing the date either as this is a giveaway.
Further thoughts on hiding your dates
Some readers object to these techniques as it makes it harder for them to tell if the content they’re reading is fresh. If you fear that this technique would frustrate your readers, then consider either of the two options:
- Consider using this technique only for sites that have truly “timeless” content. Gardening, relationships, female health, home repair, antiques/collectibles, herbal remedies, recipes and book / movie reviews are a few I can think of off the top of my head.
- Instead of removing the date, you could display the date that the post was “last updated”. The php date function would then actually broadcast something like “written 1yr 8 months ago”. Instructions on how to do this is available here: http://wordpress.org/support/topic/codergurls-hacks
Leave a Reply