PHP date "N days ago" Posted in: ionMag Post count: 3 madcerealkiller #4625 December 2, 2017 at 8:14 am Hello! How can I change the default date format (m.d.y) to a new “n days ago” or “yesterday” style? I found a good piece of code, especially for WordPress, but what file from theme directory I need to choose for edititng? Thanks. Post count: 290 Simion C. #4648 December 6, 2017 at 10:27 am Hi, I believe you are referring to something like this – https://codex.wordpress.org/Function_Reference/human_time_diff This will require you to modify the post template used (default post template->loop-single.php or post template 1->loop-single-1.php) liek this – https://www.screencast.com/t/6Sl4Z0Sz – https://www.screencast.com/t/ZYfceMLFG This is the result – https://www.screencast.com/t/6iADq4n9 Thanks Post count: 3 madcerealkiller #4660 December 6, 2017 at 12:50 pm Yeah, thanks. It works! Viewing 3 posts - 1 through 3 (of 3 total) You must be logged in to reply to this topic.