hi
I'm trying to group my post by category and display them all on the the same page. the code below functions the way I would like, but I would really like it if i didn't have go back and manually add a group each time a new category is created?
is there any way to get the code below to check for new categories and add a group each time a category is created?
--what i have figured out so far.--
function test5_loop(){
echo '<div class="group1">';
$my_query = new WP_Query('cat=5');
while ($my_query->have_posts()) : $my_query->the_post();
echo '<div class="TB1">';
echo get_the_post_thumbnail(NULL, 'thumbnail');
echo '</div>';
//echo "group1";
endwhile;
echo '</div>';
echo '<div class="group2">';
$my_query = new WP_Query('category_name=bathrooms');
while ($my_query->have_posts()) : $my_query->the_post();
echo '<div class="TB2">';
echo get_the_post_thumbnail(NULL, 'thumbnail');
echo '</div>';
//echo "group 2";
endwhile;
echo '</div>';
}
add_action('thematic_indexloop', 'test5_loop');
thanks for the help
j