Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $kb_articles = get_posts( array(
- 'orderby' => 'menu_order',
- 'order' => 'ASC',
- 'post_type' => 'knowledgebase',
- 'numberposts' => '-1',
- 'tax_query' => array( array(
- 'taxonomy' => 'knowledgebase_categories',
- 'field' => 'ID',
- 'terms' => '41',
- 'operator' => 'IN'
- )
- )
- )
- );
- if($kb_articles) {
- //start loop
- global $post;
- foreach($kb_articles as $post) : setup_postdata($post); ?>
- <li><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></li>
- <?php endforeach; } wp_reset_postdata(); ?>
Advertisement
Add Comment
Please, Sign In to add comment