Return to Snippet

Revision: 35216
at November 4, 2010 06:39 by richerimage


Initial Code
function home_recent_post() {
 if (is_front_page()) {
    echo '<ul>Recent Posts';
    $my_query = new WP_Query('showposts=5');
    while ($my_query->have_posts()) : $my_query->the_post();
        echo '<li>';
        the_title();
        the_excerpt(); 
        echo '</li>';
    endwhile;
    echo '</ul>';
 }
  wp_reset_query();
}

add_action ('thesis_hook_after_post','home_recent_post');

Initial URL


Initial Description


Initial Title
Display 5 most recent posts in thesis

Initial Tags


Initial Language
PHP