Designing CMS style sites it’s often useful to display posts from a category on a page.

An elegant approach involves showing the posts that belong to the category with the same name as the page. The code that I use has been cobbled together from various sources and typically looks something like this:

<?php $catname = get_the_title(); ?>
 <?php
 global $post;
 $myposts = get_posts
('numberposts=10&orderby=menu_order&category_name=' . $catname );
 foreach($myposts as $post) :
 setup_postdata($post);
 ?>

 <h3><?php the_title(''); ?></h3>
 <?php the_content(''); ?>
 <!-- you can put other stuff  here as well -->

 <?php endforeach; ?>

The ordering options available in the WordPress core don’t really support this approach, but there’s a great plugin that adds post ordering using drag and drop. It’s called Post Re-order and you can find out more about it here: nsp-code.com/