[wp-testers] can't query/get posts of custom post type using category argument

Ross Chapman ross at folkspants.com
Mon Apr 12 23:53:24 UTC 2010


Not working using category_name or category with ID.  Example:

<?php 
		
			$args = array(
				'post_type' => 'team',
				'category_name' => 'Executive',
				'numberposts' => -1,
				'post_status' => null,
				'post_parent' => $post->ID
				);
			$members = get_posts($args);
			foreach($members as $post) :
			setup_postdata($post);
				
			?>

Thanks, 
-Ross


More information about the wp-testers mailing list