Skip to main content
16 events
when toggle format what by license comment
Sep 29, 2015 at 8:59 history edited Pieter Goosen CC BY-SA 3.0
added 36 characters in body
Sep 28, 2015 at 15:11 history edited Pieter Goosen CC BY-SA 3.0
edited body
Sep 28, 2015 at 15:03 comment added Pieter Goosen @ImNotAwesome I have updated my code above. I had a couple of issues. I have tested all the code in my answer and it looks like it is working. I hope it will work for you as well
Sep 28, 2015 at 15:01 history edited Pieter Goosen CC BY-SA 3.0
deleted 91 characters in body
Sep 28, 2015 at 13:19 comment added ImNotAwesome @birgire yes I did my bad.
Sep 28, 2015 at 13:19 comment added ImNotAwesome @PieterGoosen sorry sir the last was message was meant for you. :)
Sep 28, 2015 at 10:10 history edited Pieter Goosen CC BY-SA 3.0
added 49 characters in body
Sep 28, 2015 at 9:20 comment added Pieter Goosen @ImNotAwesome I will quickly have a look at my code later today. I only tested it on published post date, not modified date. Will let you know ASAP once I have tested and updated the code
Sep 28, 2015 at 9:14 comment added birgire @ImNotAwesome I think you've confused usernames here, you should thank Pieter Goosen for his effort here ;-)
Sep 28, 2015 at 9:08 comment added ImNotAwesome The site PHP Version 5.4.34
Sep 28, 2015 at 9:05 comment added ImNotAwesome @birgire hello sir thank you so much for the effort. But this only output what posted on that day not what posted on that day that are modified. I tried adding 'column'=> 'post_modified_gmt', and the output are 17days,21days,16days ago and kinda messy. Btw, It only output the yesterday post with single post.
Sep 28, 2015 at 8:03 comment added birgire but anyway it's a good exercise to write such a custom function ;-)
Sep 28, 2015 at 4:24 comment added Pieter Goosen @birgire human_time_diff() is a option, yes. The output desired by the OP is slightly different, so I guess one can use the human_time_diff filter to manipulate the output. Will have a look at this later today or tommorow :-)
Sep 28, 2015 at 3:37 comment added Pieter Goosen @birgire to be really honest, I totally forgot about that ;-)
Sep 27, 2015 at 19:47 comment added birgire I wonder why you didn't use human_time_diff() here instead of get_relative_date_diff() ?
Sep 27, 2015 at 18:38 history answered Pieter Goosen CC BY-SA 3.0