Advertisement
Guest User

motyla

a guest
Feb 28th, 2013
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.66 KB | None | 0 0
  1. <?php
  2. $catArgs = array(
  3.             'taxonomy'=>'loc-category'
  4.             );
  5. $categories = get_categories('taxonomy=loc-category'); ?>
  6.  <?php foreach ($categories as $category) : ?>
  7.       <div class="loc-cat"><?php echo $category->name; ?></div>
  8.         <?php
  9.         $postArgs = array(
  10.             'orderby' => 'title',
  11.             'order' => 'ASC',
  12.             'cat'=>$category->cat_ID,
  13.             'tax_query' => array(
  14.                     array(
  15.                         'taxonomy' => 'loc-category'
  16.                     )
  17.                 )
  18.             );
  19.          query_posts($postArgs) ?>
  20.         <ul>
  21.              <?php while(have_posts()): the_post(); ?>
  22.             <li><a><?php the_title() ?></a></li>
  23.              <?php endwhile; ?>
  24.         </ul>
  25.  <?php endforeach; ?>
  26.  <?php wp_reset_query();?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement