Posts Tagged ‘query_posts’


Using Multiple Loops in WordPress with query_posts() and get_categories()

Tuesday, May 5th, 2009

This is a tutorial to demonstrate how to show entire posts from multiple categories in WordPress. This would be especially useful for blogs that contain very short posts like a photo with a short description. This is a very simple problem and solution, but I didn’t find many posts describing how to do it, so I thought it may help a few people out.

In some blogs, it can be useful to show entire posts from multiple categories on one page. For instance for a recipe blog you may want to list the name of each of your recipe categories and the recipes in each of those categories. This would look something like:

  • Breakfast Recipes
    • [Eggs Benedicts Recipe Post]
    • [Pancakes Recipe Post]
  • Lunch Recipes
    • [Grilled Cheese Sandwish Recipe Post]
  • Dinner Recipes
    • [Fettucini Alfredo Recipe Post]
    • [Lasagna Recipe Post]

Read the rest of this entry »



blog