Relative date

Hello, how can I active “Relative time” on the comments of my posts. I mean, instead of having “commented on 04th of August” I would like to have “commented 2 days ago”?

Thanks for your support

Cheers

Mohamed

Hi Mohamed,

Thanks for writing in! This will require some custom development which would be outside the scope of our support.

If you’re interested in changing, I can point you to the right direction. First you can check the related function according to your current stack using. For example if you’re using Renew stack, function file will be “x/framework/functions/renew.php”. Then you can copy the comments function into your child theme’s functions.php file and customize accordingly. If you don’t have a child theme setup, you can refer (https://theme.co/apex/forum/t/setup-how-to-setup-child-themes/57).

Also the following resource should help you to convert date format (https://codex.wordpress.org/Function_Reference/human_time_diff).

Thanks!

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.