Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <ul class="publicationCatList">
- <?php
- if( is_category(14) ) {
- //get a list of Practice Area posts in the Business category
- $args = array(
- 'post_type' => 'practice_areas',
- 'posts_per_page'=>'-1',
- 'order' => 'ASC',
- 'orderby' => 'post_title',
- 'tax_query' => array(
- array(
- 'taxonomy' => 'category',
- 'terms' => 14,
- ),
- ),
- );
- $my_query = new WP_Query( $args );
- if ( $my_query->have_posts() ) : while ( $my_query->have_posts() ) : $my_query->the_post(); ?>
- <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
- <?php endwhile;
- wp_reset_postdata();
- endif;
- }
- ?>
- </ul>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement