$args=array( 'posts_per_page' => 50, 'post_type' => 'my_custom_type' 'cat' => $cat_id, ); $wp_query = new WP_Query( $args );