Scale your business with our modular plugins.
Home » Blog » How to Show Last Updated Date in GeneratePress

How to Show Last Updated Date in GeneratePress

How to Show Last Updated Date in GeneratePress
December 19, 2025||By Jane F

Do you want to show last updated date in GeneratePress? If you are looking for a simple method, keep reading this article.

Keeping content accurate and up to date is essential for both user trust and SEO. When visitors see a recently updated post date, they are more likely to consider the content relevant and reliable, especially for tutorials, technical guides, and evergreen articles.

However, by default, GeneratePress displays the published date rather than the last modified date. In this guide, you will learn how to show the last updated date in GeneratePress using practical and straightforward methods.

We will cover theme-friendly approaches that work with the GeneratePress Customizer, as well as lightweight code snippets that do not affect performance.

By the end of this article, you will be able to clearly communicate content freshness to your readers while maintaining GeneratePress’s clean and optimized structure.

First, let’s see why showing a last updated date in a blog post is a good idea.

Why You Should Show Last Updated Date in GeneratePress

Showing the last updated date in GeneratePress is a practical way to communicate content freshness and reliability to your visitors. It helps readers understand that the information they are consuming is maintained and reviewed, which is especially valuable for guides, tutorials, and technical articles that require accuracy over time.

  • Improves content trust by clearly indicating that posts are reviewed and updated when needed
  • Helps readers quickly judge the relevance of an article before investing time in reading it
  • Encourages better engagement, as users are more likely to interact with recently updated content
  • Supports long-term SEO efforts by reinforcing freshness and content maintenance signals
  • Reduces confusion on evergreen posts where the published date alone may appear outdated
  • Aligns well with GeneratePress’s clean and minimal design philosophy without adding visual clutter

How to Show Last Updated Date in GeneratePress

Now, let’s see how to display the last updated date in GeneratePress. You will use a snippet to accomplish this task.

You can either add this code to the child theme’s functions.php file or a site-specific plugin. In this case, we will add the code to the Code Snippets plugin.

So, first, install and activate the plugin on your website.

activate code snippets

After activation, you can add a new snipppet.

add new snippet

The code you will be using is:

add_filter( 'generate_post_date_output', function( $output, $time_string ) {
    $time_string = '<time class="entry-date published" datetime="%1$s" itemprop="datePublished">Published on: %2$s</time>';

    if ( get_the_date() !== get_the_modified_date() ) {
        $time_string = '<time class="entry-date updated-date" datetime="%3$s" itemprop="dateModified">Last Updated on: %4$s</time>';
    }

    $time_string = sprintf( $time_string,
        esc_attr( get_the_date( 'c' ) ),
        esc_html( get_the_date() ),
        esc_attr( get_the_modified_date( 'c' ) ),
        esc_html( get_the_modified_date() )
    );

    return sprintf( '<span class="posted-on">%s</span> ',
        $time_string
    );
}, 10, 2 );
add gp updated date code

After pasting the code, activate the snippet. By default, the date would look like this:

publish date

Once you have activated the code, you would see the updated date.

updated date

That’s it!

This is how you can show last updated date in GeneratePress.

Frequently Asked Questions

Now, let’s take a look at some of the frequently asked questions and answers.

Can I show the last updated date in GeneratePress without changing theme files

Yes, GeneratePress allows you to display the last updated date using hooks and the Customizer without editing core theme files. By adding a small code snippet through a child theme or a code snippets plugin, you can safely show the modified date while keeping your theme update-safe.

Does showing the last updated date replace the published date

No, the last updated date can be displayed alongside the published date or instead of it. This depends on how the post meta is configured. Many sites display both dates to provide transparency and clarity to readers.

Will displaying the last updated date affect SEO

Displaying the last update date can improve user trust and engagement, thereby indirectly supporting SEO. Updated content often appears more relevant to users, especially for guides and tutorials, even though the date itself is not a direct ranking factor.

Can I show the last updated date only when a post is actually modified

Yes, you can conditionally display the last updated date only when it differs from the published date. This ensures the date appears only when meaningful updates have been made, avoiding confusion for readers.

Is it safe to add custom code in GeneratePress for this feature

Yes, GeneratePress is built to handle small, focused code additions. Using hooks or a snippets plugin keeps the implementation lightweight and prevents issues during theme updates.

Does this work with both classic and block editors

Yes, the last updated date relies on WordPress post metadata, so it works with both the classic editor and the block editor. The editor used does not affect how the date is displayed on the front end.

Can I customize the text or format of the last updated date

Yes, you can customize both the label text and the date format using PHP functions or filters. This allows you to match the wording and appearance with your site’s design and content style.

Conclusion

Displaying the last updated date in GeneratePress is a simple yet effective way to improve content clarity and user trust.

When visitors can easily see that an article has been recently updated, they are more likely to rely on the information, especially for tutorials, technical guides, and time-sensitive content.

GeneratePress makes this customization straightforward by supporting hooks and lightweight code additions without compromising performance or breaking theme updates.

By using the right approach, you can show the modified date only when it adds real value, keep your design clean, and maintain complete control over how post metadata appears.

Minor improvements like this help create a more transparent and professional website while staying true to GeneratePress’s fast, minimalist philosophy.

How else would you improve your GeneratePress website?

Let us know in the comments.

Log into your account
Forgot your password?