The MU forums have moved to

How to post Recently Updated Blog times? (3 posts)

  1. hhuskies
    Posted 16 years ago #

    Is there a hack I can put into the code on my site to show the time that each blog was last updated next to its name on my home page?

    Maybe something like:

    <?php echo date("g:i a", strtotime("now")); ?>

    Any thoughts?

  2. drmiketemp
    Posted 16 years ago #

    Take a look at how the home theme's home.php file displays the list of updated blogs. If you're doing something like that, just add in another bit of code using $details along with the time record that you want to use out of the wp_blogs table. (I don't have a copy of wpmu installed handy so I can't give you names but you should be able to figure it out.)

  3. hhuskies
    Posted 16 years ago #

    Thanks for the info Drmiketemp. Here is the PHP code that I came up with, but it doesn't work properly. I think that I have my PHP all mixed up. (i am still learning basic PHP)

    <?php echo time( $details[ 'last_updated' ], 'g:i a'); ?>

    So basically, I guess I am trying to use the variable $details to output last_updated from the database. And format it to the output of g:i a. Would you be able to rewrite this as proper php?

    Last_Updated is the time record from the wp_blogs table you told me to check out.



About this Topic

  • Started 16 years ago by hhuskies
  • Latest reply from hhuskies