wpexplorer

Untitled

Feb 13th, 2013
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. <?php
  2. $kb_articles = get_posts( array(
  3. 'orderby' => 'menu_order',
  4. 'order' => 'ASC',
  5. 'post_type' => 'knowledgebase',
  6. 'numberposts' => '-1',
  7. 'tax_query' => array( array(
  8. 'taxonomy' => 'knowledgebase_categories',
  9. 'field' => 'ID',
  10. 'terms' => '41',
  11. 'operator' => 'IN'
  12. )
  13. )
  14. )
  15. );
  16. if($kb_articles) {
  17. //start loop
  18. global $post;
  19. foreach($kb_articles as $post) : setup_postdata($post); ?>
  20.  
  21. <li><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></li>
  22.  
  23. <?php endforeach; } wp_reset_postdata(); ?>
Advertisement
Add Comment
Please, Sign In to add comment