• Resolved Joerg Gebauer

    (@newshoremedia)


    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)
  • Plugin Contributor motopress

    (@motopress)

    Hi Joerg,
    Could you update plugin to latest version and check if it is fixed. If the issue persists you can describe the issue more detailed and providing this information by email. Thank you.

Viewing 1 replies (of 1 total)
  • The topic ‘Plugin breaks get_posts with ‘author’ parameter’ is closed to new replies.