NetChimp

Cheap Web Design, Search Engine Optimisation & Conversion Rate Optimisation

  • Start Here
  • About
  • Clients & results
  • Services
    • Website Reviews
    • Web Site Design
    • Website Conversion
    • Search Engine Optimisation (SEO)
    • Ways To Pay For Your Website
  • Portfolio
  • Articles
    • Useful Resources
    • Conversion Rate Optimistation (CRO)
    • IR35
    • Joomla!
    • Marketing
    • Search Engine Optimision (SEO)
    • Usability
    • Web Design
    • WordPress
  • Learning Zone
    • Free Report
  • Contact
You are here: Home / Web Design / How To Add ‘Last Updated’ To Genesis WordPress Themes

Last Edited : September 8, 2015

How To Add ‘Last Updated’ To Genesis WordPress Themes

Why add ‘Last Updated’ to Genesis WordPress Themes?

I was reading an article over at Viper Chill about how new ‘fresh’ content appears to be ranking above highly regarded older content in Google these days. From the tests that Glen at Viper Chill ran over the course of a year (with 100 or more search terms) he found that fresh content would outrank old stuff in most cases. Even if the fresh content was spammy and the old stuff was good quality.

As you can imagine this caused a real stir.

On this blog I deliberately removed the post date because I knew people often ignore older information in preferences to the latest stuff. I thought that if I removed the date then people wouldn’t be influenced by this factor and would read my content based on it’s quality. However, after reading the above article I came away thinking that dates on blog posts are important after all as they take advantage of the freshness element of the Google algorithm.

Making your content appear fresh to Google

I decided that using the post date on my WordPress blog was a bad idea. This dates the post badly and would lead to poor Google rankings. However, I do update my posts quite often – even the older ones – so I decided that I should use ‘last updated’ as my post date instead. That way the information looks fresh to Google and to my readers.

Adding ‘Last Updated to ‘Genesis’ – surely it’s easy

I uses the Genesis Theme on my blog so I had to figure out how to add the post update date instead of the post date. I thought that swapping out the code for August 1, 2013 for something like [latest_update] would do the trick. My first port of call was the shortcode reference  on the Genesis website but when I checked it out I realized there was no shortcode that I could use.

So I had to come up with a plan that allowed the date to appear without hacking the core code in Genesis. With a little help from The Customize Window and Genesis plugins Genesis Simple Edits and Genesis Simple Hooks I was able to get the effect I was after.

How To Add ‘Last Updated’ To Genesis WordPress Themes

  1. Login to the admin area of your WordPress website
  2. Select Plugins > Add New from the menu
  3. In the search box type in ‘Genesis Simple Edits‘ and click search plugins
  4. Click ‘Install Now’ below the item ‘Genesis Simple Edits‘
  5. Click OK to say you are happy to install the plugin
  6. Let the plugin install and on the next screen that appears click ‘Activate Plugin’
  7. Repeat steps 2 -6 for the ‘Genesis Simple Hooks‘ plugin
  8. Select Genesis > Simple Edits from the menu
  9. In the top box called ‘Post Info’ remove all of the text and click ‘Save Settings’
  10. Select Genesis > Simple Hooks from the menu
  11. Scroll about half way down the list of hooks to ‘genesis_after_post_title Hook’
  12. In the box copy and paste this code (see the end of this post for an explanation of the code):
    <?php $u_time = get_the_time('U');
    $u_modified_time = get_the_modified_time('U');
    if($u_modified_time != $u_time) {
    echo "<p style = 'font-size: 80%'>Last updated : ";
    the_modified_time('j F Y');
    echo "</p>";
    } ?>
  13. Underneath put a tick in the box that says ‘Execute PHP on this hook?’
  14. Click  any Save Changes button on the page

What the code means
The code that you used finds the modified date and time and then displays it under the post title at 80% of it’s original size.

I don’t actually show the update time, just the date  – but you could add this if you wish. Simply update the line that says:

the_modified_time('j F Y');

to:

the_modified_time('l, j F Y g:i A');

 

Did you find this article helpful?

If you found this article helpful please take a moment to tweet, like, or share this article by using the buttons at the top or bottom of this page. I’d really appreciate it. 🙂

Also, if you are feeling really generous please leave some encouraging feedback in the comments section at the bottom of the page. I love getting feedback from visitors.

Recommended Articles


You may also like

WordPress blog move or URL redirect
How To Setup WordPress for AMP: Accelerated Mobile Pages
14 tips when using direct mail


You may also like

18 low cost ideas to increase your sales
Fix WordPress deprecated simplepie errors - assigning the return value of new by reference is deprec...
Online Shop And Ecommerce Web Design
Transform Your Business
Joomla shows £ instead of £

Filed Under: Search Engine Optimision (SEO), Tips, WordPress Tagged With: genesis, google, seo tips, wordpress

About Kevin Craighead

Hi! My name is Kevin Craighead and I am the guy behind NetChimp.

I have been working in the computer industry since 1988 although my love of electronics goes back even further to my first experience of Pong in the late 70's.

Comments

  1. Shea says

    June 2, 2014 at 8:47 pm

    Hello Kevin, I came across this post late. Is it possible to have an option of whether or not you want the “last updated” date to take affect? In other words, if I go back to an older post to fix a typo for example and then click update, it will bump the date up to the current date correct?

    I would rather have it as an option to eliminate the risk of having multiple posts with the same “last updated” date if I was making wholesale changes of say images within those posts and not really changing much in content.

    Reply
  2. Akash says

    February 1, 2014 at 7:34 pm

    I followed your method, but instead of one I am getting two errors. Surprisingly, even this page of yours shows the same errors.
    Error: Missing required field “updated”.
    Error: Missing required hCard “author”.
    When did you last check it? Please post an update on this post. Thank you in advance!

    Reply
    • Kevin Craighead says

      February 3, 2014 at 12:09 pm

      That is odd – when I check using Chrome and Firefox on my Mac the date appears properly. It also works on Firefox and IE on a PC. What browser are you using?

      Reply
  3. Glenys says

    January 2, 2014 at 1:02 am

    Thanks Kevin, this was just what I was looking for!
    I’ve always debated about whether or not dates should be included, especially after reading Glen’s article that you refer to. But because I get irritated myself when dates are missing in the SERPs, I decided to re-include them on my own blog. And now that I have come across this idea, of replacing the published date with the updated date, it provides a perfect solution.

    It is so much easier to follow step-by-step guidelines like you have listed in your post, especially when tweaking Genesis code, thanks.

    Reply
  4. Manivasagam says

    September 4, 2013 at 9:21 pm

    Hi, thanks for the awesome tutz, which i was looking for genesis .. one thing i like to ask,

    The code youve given does the same function as this one ??

    Last updated on
    <time datetime="”>

    i found this code on wpbeginner , so just does both are same or different ?? If yes,

    Can i just replace the code you’ve given with this one on the genesis simple hooks > genesis_after_post hook ??

    Please reply ..

    Reply
    • Kevin Craighead says

      September 9, 2013 at 1:35 pm

      Thanks for the reply!

      I would follow the tutorial and change the code as per my instructions. I’m not saying what you have found won’t work – it’s just that I know the fix I have posted does. 🙂

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About Me

kevin craighead netchimpHi! My name is Kevin Craighead and I am the guy behind NetChimp. I have been working in IT since 1988 but my love of gadgets goes back to my first experience of Pong in the late 70's.MORE →

Popular Stories & Tips

Contact Details

  • ADDRESS:
    Cirrus Building, 6 International Avenue, ABZ Business Park, Dyce, Aberdeen AB21 0BH
  • PHONE:
    01904 230477
  • OFFICE HOURS:
    Mon - Fri 9:30 am to 5:30 pm.

Company Details

  • REGISTERED ADDRESS:
    Change Accountants, 2 Forest Farm Business Park, Fulford, York YO19 4RH
  • COMPANY NO:
    Registered in England and Wales: 7632651

Web Design Links

  • Web Design York
  • SEO York
  • Web Design Aberdeen
  • Web Design Hull
  • Web Design Sheffield
  • 50 Incredible Tips For A Successful Website

Contact Details

NetChimp, Cirrus Building, 6 International Avenue, ABZ Business Park, Dyce, Aberdeen AB21 0BH

CALL:
01904 230 477

OFFICE HOURS:
Mon - Fri 9:30 am to 5:00 pm.

Recent Posts

  • How To Setup WordPress for AMP: Accelerated Mobile Pages
  • Is Your Website Underperforming?
  • How Much Should a Website Cost?
  • How to add Google AdSense Responsive Ads to WordPress
  • Consequences And Responsibilities Of IR35 Regulations

©2019 NetChimp Limited. All rights reserved | See us on Google Earth | Web Design York | Small Business Web Designer | Web Design in York

We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.Accept
Cookie Policy
Necessary
Always Enabled