Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #579119


    I’m using the “elegant blog layout” and added in loop-index.php this code snippet; it shows, when a post has been updated:

    if(strtotime($post->post_modified) - strtotime($post->post_date) > 86400) {  
    echo "<span class='aktualisiert'>(aktualisiert: ",
    the_modified_date('j. M. Y').')</span></span>';

    It should appear only at the bottom of a single post – so far, so good, it works:

    I have added this code snippet in the loop-index.php at line 207-209:

    The problem is:
    it shows this “updated time” also at the blog page below the excerpt and the “read more” button:

    Could you please tell me, where exactly in the loop-index.php I can place the code snippet mentioned above,
    so that it appears only in single post, but not at the blog page under each post preview/excerpt?

    Thank you.



    Surround it with this.

    if ( is_single() ) {

    Best regards,


    Wow, great, that works perfectly, thank you Elliott!!



    Glad we could help :-)


Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.