The MU forums have moved to WordPress.org

get_last_updated and the latest posts in each blog (2 posts)

  1. stephxwerx
    Member
    Posted 16 years ago #

    I'm sketchy on PHP and trying to fill in for a developer so apologies for my basic queries. I want to pull down the list of the 6 last updated blogs along with the last post from each. Something like this:

    Blog title
    Latest post title - latest post datestamp
    First 50 words from the latest post
    Read more link to latest post

    I'm able to get the latest blog titles listing out using:

    <?php
    $blogs = get_last_updated();
    if(is_array($blogs)) {
    ?>

    <?php foreach($blogs as $details) {
    ?><p class="top_blogs_header">">
    <?php echo get_blog_option($details[ 'blog_id' ], 'blogname' ) ?>
    </p>

    Can some one tell me where the 'blogname' info is being pulled from - I can't see it in the database anywhere!!!

  2. drmiketemp
    Member
    Posted 16 years ago #

    Please post your code again but place it within backticks. That's the kep right above the tab key and to tthe left of the '1' key on a standard pc keyboard.

About this Topic

  • Started 16 years ago by stephxwerx
  • Latest reply from drmiketemp