I have found solutions to "Most Recent Blogs" and "Most Recent Posts" elsewhere in these forums ... so I am not taking credit for this code, in anyway, but this is the code I use.
For "Most Recent Posts":
- - - - - - - - - - - - - - - - - -
<div class="recent-posts">
<h2>Recent Posts</h2>
<?php
$blogs = get_last_updated();
foreach ($blogs as $blog) :
// we need _posts and _options tables for this to work
$blogOptionsTable = "wp_".$blog['blog_id']."_options";
$blogPostsTable = "wp_".$blog['blog_id']."_posts";
// we fetch the blog name
$opt2 = $wpdb->get_col("SELECT option_value FROM $blogOptionsTable WHERE option_name='blogname'");
// we fetch the latest post
$opt3 = $wpdb->get_row("SELECT * FROM $blogPostsTable WHERE post_status='publish' AND post_type='post' ORDER BY post_date DESC LIMIT 0,1");
// sometimes the guid is missing, so just use blog url
if (trim($opt3->guid)) {
$mypostlink = trim($opt3->guid);
} else {
$mypostlink = 'http://'.trim($blog['domain']);
}
$myposttitle = '<big><a href="'.$mypostlink.'"><b>'.$opt3->post_title.'</b></a></big><br/>';
$mypostdetails = '<small>from <a href="http://'.trim($blog['domain']).'">'.trim($blog['domain']).'</a> on '.strftime("%A, %B %d, %Y at %I:%M %p",strtotime($opt3->post_date)).'</small><br/>';
$mypostcontent = '<em>'.$opt3->post_content.'</em>';
print '<div class="post">'."n".$myposttitle."n".$mypostdetails."n".$mypostcontent."n</div>n";
endforeach;
?>
</div>
- - - - - - - - - - - - - - - - - -