Advertisement
imranmodel32

Custom taxonomies post query (category item)

Apr 3rd, 2014
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. <?php
  2. $args=array(
  3. 'post_type' => 'POST_TYPE_HERE',
  4. 'post_status' => 'publish',
  5. 'posts_per_page' => -1,
  6. 'caller_get_posts'=> 1,
  7. 'tax_query' => array(
  8. array(
  9. 'taxonomy' => 'TAXONOMIY_HERE',
  10. 'field' => 'slug',
  11. 'terms' => 'TEXONOMY_ITEM_HERE'
  12. )
  13. )
  14. );
  15. query_posts($args);
  16. ?>
  17. <?php?>
  18. <?php while ( have_posts() ) : the_post(); ?>
  19. <h3><?php the_title()?></h3>
  20. <?php the_content()?>
  21. <?php endwhile; wp_reset_query(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement