• Resolved kghugo2000

    (@kghugo2000)


    Dear developers,

    is there a way to show when did a post update? I am asking because I know oceanwp is powerful and i am not sure if this function has been included as well.

    Thank you for reading.

    The page I need help with: [log in to see the link]

Viewing 11 replies - 1 through 11 (of 11 total)
  • Hello,

    To do it, you need to use OceanWP child theme. Copy the meta.php file from the OceanWP > partials > entry and OceanWP > partials > single folder into your child theme with the same path. Now open the meta.php file from the copied folder and replace the get_the_date() function with the the_modified_time() function.

    Thread Starter kghugo2000

    (@kghugo2000)

    Do you mean that I can achieve it simply by replacing “the get_the_date” with “the_modified_time”? in those two files?

    Yes, but after copying the files into the child theme otherwise it will be lost after the theme updates.

    Thread Starter kghugo2000

    (@kghugo2000)

    I see thank you so much! Also I want to ask if CSS code will be lost after the theme updates?

    Thank you for reading.

    If you added the code in the child theme or Customise > Custom CSS section, then no problem.

    Thread Starter kghugo2000

    (@kghugo2000)

    I see thank you so much for your help!

    You’re welcome!

    Thread Starter kghugo2000

    (@kghugo2000)

    Dear developers,

    After I have done make the change by copy the meta php file from the parent theme to the child theme and replaced the get_the_date() function with the the_modified_time() function, the date display is not work. It does not show the last modified date and it only shows time now. What should I do in order to make the last modified date displays in post and in the meta info?

    Thank you for reading and I really appreciate your help.

    Yours faithfully,
    Hugo Sum

    Did you activate the child theme? It should work.
    See here – https://codex.www.ads-software.com/Function_Reference/the_modified_date

    Thread Starter kghugo2000

    (@kghugo2000)

    Thank you so much for your help!

    I think the problem lies on the_modified_time. When I replace the code with the_modified_date, it works perfectly

    Glad to hear that it is fixed!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Post updated time’ is closed to new replies.