Support » Plugins » Can’t get Dunstan’s Time Since to work

  • Hi,
    I’m a fresh-faced newbie at this so please bear with my naivite. I installed and activated Dunstan’s Time Since plugin but it doesn’t work. I guess I need to alter something in the plugin file, but I don’t really understand what I’m supposed to change and where. Right now, the code is exactly the same as downloaded. Nothing has been altered yet. Thanks in advance.

Viewing 1 replies (of 1 total)
  • gaianeh,
    Around line 98 in your index.php file, you’ll see something similar to:
    <?php the_time(‘F jS, Y’) ?>
    on the next line paste:
    <?php $entry_datetime = abs(strtotime($post->post_date)); echo time_since($entry_datetime) ?> ago
    You’ll have to tweak it a bit to get it where you want it. I have a <br> to make it appear on the next line in my blog.
    Other options, as they appear in the code file:
    <?php $comment_datetime = abs(strtotime($comment->comment_date)); echo time_since($comment_datetime); ?> ago
    Between Entry and Comment:
    <?php $entry_datetime = abs(strtotime($post->post_date)); $comment_datetime = abs(strtotime($comment->comment_date)); echo time_since($entry_datetime, $comment_datetime) ?> after the fact.

Viewing 1 replies (of 1 total)
  • The topic ‘Can’t get Dunstan’s Time Since to work’ is closed to new replies.