Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

wp_query post by category taxonomy

// If the taxonomy is the default category then:
$args = array( 
  'post_type'   => 'post',
  'category_name' => $category_name,
  'no_found_rows'          => true,
  'update_post_term_cache' => false,
  'update_post_meta_cache' => false,
);
$posts = new WP_Query( $args );
Source by wordpress.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #post #category #taxonomy
ADD COMMENT
Topic
Name
6+6 =