error with wp_query when retrieving custom post types
-
Hi All,
i’ve built a custom query loop to retrieve posts from a custom post type, i also only want to retrieve a few specified posts by id
$films = new WP_Query('post_type=films', array('post__in'=>$arrayOfNumbs));if i leave the post_type out so it defaults to posts and add the films to the posts section of wordpress this works fine but when i add the films to the custom films post type and add the post_type parameter the loop ignores the post__in array (which is previously correctly echo’d out) it ignores this parameter and returns all of the films?
any help with this is much appreciated
The topic ‘error with wp_query when retrieving custom post types’ is closed to new replies.