I am using the mini-loop on a home page. I want to display the post content.
Also I would maybe like to display the excerpt instead.
This code is successful in fetching the latest post and displaying the title. How can I get it to display the content and how could I get it to display the excerpt?
thanks.
code:
<?php
$how_many=1;
require_once("/wp-config.php"); ?>
<ul id="whats-new">
<?
$news=$wpdb->get_results("SELECT ID,post_title FROM $wpdb->postspost_status
WHERE = \"publish\" ORDER BY 'ID' DESC LIMIT ".$how_many);
foreach($news as $np){
print ("<li><a href=\"");
echo get_permalink($np->ID);
print ("\">$np->post_title</a></li>");
} ?>
</ul>