I dont know if this code is easy to find or anything but I thought id post it anyways encase anyones looking
this snippet will list all posts in a category which you specify on a page which you specify
the code below will replace any content within that page with the list of Linked posts within the category you chose.
function my_page_of_posts() {
if (is_page('833')) {
$custom_loop = new WP_Query('posts_per_page=5&cat=9');
echo '<div class="my-archives"><ul class="archive-list">';
if ( $custom_loop->have_posts() ) : while ( $custom_loop->have_posts() ) : $custom_loop->the_post();
echo '<li><a class="archive-link" href="' . get_permalink() . '">' . get_the_title() . '</a> <span class="my-comment-count">( ';
comments_number('0', '1', '%');
echo ' )</span></li>';
endwhile;
wp_reset_query();
endif;
echo '</ul></div>';
}
}
add_action('thesis_hook_after_content','my_page_of_posts');
Make sure to edit the Numbers in the code above to correlate to your specific needs,
Page to list links on, Category which to pull posts from, Number of posts to display in the list
if you want to KEEP the content of the page you choose to display the list on, then change
add_action('the_content','my_page_of_posts');
to
add_action('THE-HOOK-TO-WHERE-YOU-WANT-IT-DISPLAYED','my_page_of_posts');
Snippets rock!