Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $catArgs = array(
- 'taxonomy'=>'loc-category'
- );
- $categories = get_categories('taxonomy=loc-category'); ?>
- <?php foreach ($categories as $category) : ?>
- <div class="loc-cat"><?php echo $category->name; ?></div>
- <?php
- $postArgs = array(
- 'orderby' => 'title',
- 'order' => 'ASC',
- 'cat'=>$category->cat_ID,
- 'tax_query' => array(
- array(
- 'taxonomy' => 'loc-category'
- )
- )
- );
- query_posts($postArgs) ?>
- <ul>
- <?php while(have_posts()): the_post(); ?>
- <li><a><?php the_title() ?></a></li>
- <?php endwhile; ?>
- </ul>
- <?php endforeach; ?>
- <?php wp_reset_query();?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement