I've been using the mini-loop to pull a sort of rss feed into my static home page. However, my blog has multiple authors and I'd like to integrate that into the mini-loop while maintaining the formatting in the current list. Here's the code I've been using:
<?php
$how_many=3; //How many posts do you want to show
require_once("blog/wp-config.php"); // Change this for your path to wp-config.php file ?>
<ul><?
$news=$wpdb->get_results("SELECT <code>ID</code>,<code>post_title</code>,<code>post_date</code>,<code>post_author</code> FROM $wpdb->posts
WHERE <code>post_type</code>=\"post\" AND <code>post_status</code>= \"publish\" ORDER BY ID DESC LIMIT ".$how_many);
foreach($news as $np){
echo '
<li><a href="'.get_permalink($np->ID).'">'.$np->post_title.'</a>
<br><em>'.date('l, F jS Y', strtotime($np->post_date)).'</em></li>';
} ?></ul>
Is there any way I can add the author name while maintaining the formatting style I have now?