Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Forum: Plugins
    In reply to: How to… Last Updated text

    Careful if you copy Kaf’s php date/time example there – there shouldn’t be two ‘echo’s in the code – that gave me errors the first time until I paid more attention and realised what the problem was.

    Hi all, I got a response from Kaf who runs https://guff.szub.net

    Here’s the code for anyone who comes here looking for a response.

    Put this into your theloop.php

    <?php
    $last = $wpdb->get_var(“SELECT post_modified FROM $wpdb->posts order by post_modified DESC LIMIT 1”);
    echo “Last update: ” . mysql2date(get_settings *’date_format’*, $last);
    ?>

    where *’date format’* is the date format you want in php language. Make sure to delete the *’s, they were just there for your reference.

    Worked for me.

    Hey there,

    Not sure if I was that customer (!) but have exactly the same request… getting the latest modified date for *anywhere* on the site (including pages0, and have it displayed on the main blog (the front).
    Is there an easy way to do this?

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)