Support » Fixing WordPress » Display dates on Every Post

  • Resolved techtoll


    I have used a condition for displaying post which is older than 1 day. I have used the looping which something like this

    $mylimit=1 * 86400; //1 day * seconds per day
    $post_age = date('U') - mysql2date('U', $post->post_date_gmt);
    if ($post_age < $mylimit) {
    	echo ("at ");
    else {
    	echo ("on ");

    This works fine on single post but on index page only one post displays the date if multiple posts have been done on the same page.

    How to modify it?

    Here is my blog.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Display dates on Every Post’ is closed to new replies.