• Is there a way to change the dates shown on the front end from exact like October 12, 2015 to be relative and say for instance “a year ago”, “a month ago”, “2 days ago” etc?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter makemymark

    (@makemymark)

    Looks like would need to change the standard php date variable to the following:

    <?php echo human_time_diff( get_the_time(‘U’), current_time(‘timestamp’) ) . ‘ ago’; ?>

    Reference: https://codex.ww.wp.xz.cn/Function_Reference/human_time_diff

    Plugin Contributor Nuanced Media

    (@nuanced-media)

    Precisely. We can build this as an option into a future release, however if you are interested in implementing this yourself. You can find the handling of the date in review display in /shortcodes/rr-show.php around line 130.

    Let me know if you need any further direction,
    Cheers,
    Charlie Maxwell
    [NM_Developer]

    Thread Starter makemymark

    (@makemymark)

    Awesome, thank you!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Relative Dates’ is closed to new replies.