Plugin breaks get_posts with ‘author’ parameter
-
Hey there,
your plugin (which is very useful, btw) breaks a get_posts query for a custom post type and the author parameter.
This here doesn’t work and returns all post types BUT the post type in the arguments:
$posts = get_posts(array(
‘post_type’ => ‘myCPT’,
‘order’ => ‘ASC’,
‘author’ => 1,
‘posts_per_page’ => -1
));While this here works:
$posts = get_posts(array(
‘post_type’ => ‘myCPT’,
‘order’ => ‘ASC’,
‘author__in’ => array(1),
‘posts_per_page’ => -1
));It’s a workaround for the time being, but you should take a look at this.
Keep up the great work!
Cheers
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Plugin breaks get_posts with ‘author’ parameter’ is closed to new replies.