Excerpts help

  • So I’ve decided just to customize a theme rather than try to integrate the blog into a page, because that wasn’t working very well.

    I still can’t find any documentation on putting the excerpts on my main page though.

    Right now, i have this code entered, as per a previous instruction:

    $how_many=5; //
    require_once(“blog/wp-config.php”); // ?>

    <ol id=”whats-new”>
    $news=$wpdb->get_results(“SELECT ID,post_title FROM $wpdb->posts
    WHERE post_status= \”publish\” ORDER BY ‘ID’ DESC LIMIT “.$how_many);
    foreach($news as $np){
    printf (”

  • %s
  • “, $np->ID,$np->post_title);

    That gives me the last 5 entries, and it seems to work fine.

    What code do i need to enter in there (and where) to also include the excerpts for the 5 links? I need to link a little more than just the entry subject.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Excerpts help’ is closed to new replies.