Hi
I'm pulling my hair out with this and would be very grateful for help.
I've got a static home page and the main blog in a separate directory. I'm using the following code to pull excerpts from posts onto the static home page and I'd like to add a link underneath each excerpt which says something like 'Read More'.
I'm a total noob, I've looked at the_excerpt_reloaded plugin and can't get it to work on the static home page. And I've tried changing post_excerpt to post_content and then using the 'more' tag and that won't work either.
Can anyone help? Would be very, very grateful.
<?php
$how_many=6;
require_once("wordpress/wp-config.php");
$news=$wpdb->get_results("SELECT ID, post_title, post_excerpt FROM $wpdb->posts
WHERE post_type='post' ORDER BY ID DESC LIMIT $how_many");
foreach($news as $np){
echo '
<h3>ID).'">'.$np->post_title.'</h3>
<p>'.$np->post_excerpt.'</p>';
}
?>