Home Forums WoodMart support forum Show updated date on the single post page

Show updated date on the single post page

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #139678

    kuanbc
    Participant

    Hi,

    I notice that there is a hidden updated date data on a single post page.
    Can I make it visible?

    Which file should I make the modification in?

    Please see attached image.

    Attachments:
    You must be logged in to view attached files.
    #139699

    Hello,

    You can edit the date of the post in the admin panel, you can set any date and it will be visible. Your screen is not clear I cannot figure out what date you mean.

    Best Regards

    #139721

    kuanbc
    Participant

    I uploaded a more clear screenshot, please take a look.

    The screenshot was taken on this woodmart single post demo page:
    https://woodmart.xtemos.com/blog/2016/07/23/minimalist-design-furniture-2016/demo/decor/

    As you can see, below the post title, there is a word “post”. I use chrome’s developer tool to check this element and found that it has codes like this:
    <li class=”modified-date”><time class=”updated” datetime=”2019-01-02T16:46:18+00:00″>January 2, 2019</time>

    My question is:
    I am trying to modify the theme to show updated date instead of publish date for posts.

    It seem Woodmart has already pull the update(modified) date data from the database by default, but just not showing on the frontend.

    I was wondering how can I show the post modified date on the frontend?

    I tried to add some codes in content.php to show post modified date. It did work, but the problem is there will be two identical “post modified date” within a single post, and since by default the theme has already pull the modified date data, I would like to know how to make that data visible?

    Attachments:
    You must be logged in to view attached files.
    #139739

    Artem Temos
    Keymaster

    Try to add the following code snippet to the Custom CSS area in Theme Settings

    ul.entry-meta-list li.modified-date {
    	font-size: 14px; 
    	margin-right: 10px;
    }
    #139851

    kuanbc
    Participant

    Very cool!

    I tried it and it worked!

    May I know which file content the codes in?
    I want to add some words like “Last modified:” before the date.

    #139858

    kuanbc
    Participant

    Hi, nevermind. I found it. It’s in the template-tags.php file. Thanks.

    #139852

    Artem Temos
    Keymaster

    You can find the code for this in the file inc/template-tags.php.

    #139918

    kuanbc
    Participant

    Thanks for the reply.

    #139941

    You are welcome! If you have any questions please feel free to contact us.

    Best Regards

Viewing 9 posts - 1 through 9 (of 9 total)

The topic ‘Show updated date on the single post page’ is closed to new replies.