Hello again, I would like to change the dates format and use something like:
* 1 minute ago
* 1 hour ago
* 8 hours ago
Is it possible?
According to wordpress codex,
For posts
<?php echo human_time_diff( get_the_time('U'), current_time('timestamp') ) . ' ago'; ?>
and for comments
<?php echo human_time_diff( get_comment_time('U'), current_time('timestamp') ) . ' ago'; ?>
but where do I find these codes? Which templates to edit in the theme?
hi,
in modules files: http://screencast.com/t/4MdlOWQZll we use the get_date() function.
the function is defined here: http://screencast.com/t/W2DQw0Og5F .
Thanks for you message.
Radu A.
Any idea how I should modify the files to change the time format on whole site?
@Lucian I don’t want that way. How can I implement human time difference?
The one like “1 days ago”, “2 hours ago” ??
Hi, some blocks are showing the same time for all articles… like 1 month ago for all or like 16 hours ago for all… 🙁
And also it needs to be ajax…… 🙁 shit there are lot of problems!
Hi,
I have tested this and found no issues with it: http://screencast.com/t/HQvL2clz
Also on category pages: http://screencast.com/t/seT1s9ojF
Please add this , $this->post->ID like this and check again: http://screencast.com/t/IGGByAUT
Thanks
Thanks a lot, this time it works! I might give you the best support award 🙂
One more thing.. It needs to be working with ajax like the views counter.
Possible? Please?
Hi,
I doubt that this can be done easily, the theme was not designed to work with this time format so if you want to use this you would have to give up caching or you can try to search for a solution to get past cache, I recommend you hire a developer if you really want to do this, this is custom work and we we cannot offer custom work as we work hard on the development, updates, fixes and support.
Thanks
I’m happy with this much @Lucian thanks. anyway after 1 hours it shows time like 1 hours ago, 2 hours ago so that’s no issue
I talked to a developer and he said that the theme developers can help. His name is Alex, he told that if they can do it for views then why not for time?
He suggested that there’s a plugin wp-days-ago that already has ajax functionality. So if you guys could help me integrate it or use the ajax function from it? :/
Hi,
The theme was not designed to work with this time format and we try not to overload it.
In other words this is custom work and we cannot offer custom work as we work hard on the development, updates, fixes and support. You can hire a freelancer/developer to do this for you or you can use that plugin make some research and try to find a solution for this yourself, you can take a look at the views counts using ajax here: http://screencast.com/t/LAVMQDmY
Sorry for the inconvenience!
Thanks for the message!
