How to Display Last Modified Date in OceanWP

show last updated date WordPress

OceanWP is one of the most flexible themes for WordPress. You can use it for blogs, e-commerce sites or websites.

While you can almost change everything to your liking, there is no way to show the modified date(when the page/post was last updated) instead of Published date.

You can hide the published date but can’t replace it with the modified date.

Or can you?

In this tutorial, you will learn how to show Last Updated/Modified Date instead of Published Date in OceanWP.

Why Would You Want to Display Modified Date?

There’s a simple answer to that.

The published date is the date when your post was published.

Imagine you published your post 1 year ago but updated it yesterday.

What will your readers see?

They will see the published date and think that it’s outdated. Even though you updated it yesterday.

Everyone wants to read fresh content. People may reject your content just because it displays the published date instead of last modified date.

How to Display Last Modified Date in OceanWP:

Note: In the latest update OceanWP has made it easier to display modified date. You just have open the Theme Customizer and go to Blog>Single Post.

The method that I’m going to show you will replace the published date. It won’t add any extra line below the meta info like the modified date plugin.

Caution: This method involves a tiny bit of theme code editing. Pay attention while you follow the steps and don’t screw up. And of course, back up your site.

1. Head over to Theme Editor(Appearance>Theme Editor)

2. Navigate to partials/single/meta.php

3. Now change the get_the-published_date() to get_the modified_date(). Your theme code will look like this:

modified date code

If you aren’t using a child theme the changes will be lost on theme update. So use a child theme or remember to change the code after every update.

Himanshu Kumar

He is college student. And likes to write about money making apps, fantasy apps and other tech stuff.

This Post Has 6 Comments

  1. Ralph Bamigboye

    Great blog! Great articles… I’ve been following your blog since you were on blogger Emporio theme. I must say I love this theme now that you’ve moved to WordPress.

    In fact! I’ve decided it’s the theme I’ll be going for once I move to WordPress. Thumbs up!

    This is Ralph from Nigeria!

    1. Himanshu Kumar


  2. Puru Kashyap


    I would like to show the updated date on the posts but my question is when the theme is going to be updated, this code may no longer be available.

    What can we do to make it applicable permanently?

    Please Help

    1. Himanshu Kumar

      You don’t have to worry about that any more. In the latest update OceanWp has added the option to show Modified Date.

    2. Himanshu Kumar

      You don’t have to worry about that anymore. In the latest update OceanWp has added the option to show Modified Date.

      1. AMit

        Although the Modified date has been added but how to display the text version of it? The modified date is visible in form of ICONS.

Leave a Reply