Alright... after tweaking the first part of the answer to include all categories, it looks like this:
[next time, please use the pastebin for any code longer than 10 lines]
<?php
foreach( get_categories() as $cat_id ) {
$args=array(
'cat' => $cat_id,
'post_type' => 'post',
'post_status' => 'publish',
'posts_per_page' => 2,
'caller_get_posts'=> 1
);
$my_query = null;
$my_query = new WP_Query($args);
if( $my_query->have_posts() ) {
echo 'List of Posts for category '. $cat_id;
while ($my_query->have_posts()) : $my_query->the_post();
$do_not_duplicate[] = $post->ID ?>
<p><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></p>
<?php
//the_content(); //or the_excerpt{};
endwhile;
}
}
wp_reset_query(); // Restore global post data stomped by the_post().
?>
But in the second part of the answer:
$my_query = new WP_Query('category_name=featured&posts_per_page=2');
How do I blend them?
Also... am I reading this right in thinking that this part:
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
...is what I'm replacing with the final version of the above?
I'm a code tweaker and not a coder thus all the questions. ;)
Thank you!