WP_Query
does not accept a comma delimited string for the post_type
argument, it must be one of either a string
(for one post_type
) or an array
(for one-or-more post_type
).
$args = array(
'post_type' => 'post'
);
$query = new WP_Query($args);
OR
$args = array(
'post_type' =>
array(
'post'
)
);
$query = new WP_Query($args);
OR
$args = array(
'post_type' =>
array(
'post',
'page',
'movie',
'book'
)
);
$query = new WP_Query($args);
Useful reading: