Can't get Dunstan's Time Since to work (2 posts)

  1. gaianeh
    Posted 10 years ago #

    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.

  2. tinarenee
    Posted 10 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.