Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. // get all the categories from the database
  2. $cats = get_categories();
  3. // loop through the categries
  4. foreach ($cats as $cat) {
  5. // setup the cateogory ID
  6. $cat_id= 0;
  7. // Make a header for the cateogry
  8. // create a custom wordpress query
  9. query_posts("cat=$cat_id&posts_per_page=22");
  10. // start the wordpress loop!
  11. if (have_posts()) : while (have_posts()) : the_post();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement