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

    Hi,

    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: http://screencloud.net/v/juON

    I have added this code snippet in the loop-index.php at line 207-209:
    http://pastebin.com/5xnZ6zku

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

    http://screencloud.net/v/jSNs

    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.

    #579306

    Hi COLORIT!

    Surround it with this.

    if ( is_single() ) {
    
    }

    Best regards,
    Elliott

    #579570

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

    #580143

    Hi,

    Glad we could help :-)

    Regards,
    Rikard

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