get_post Does Not Return Correct Results (1 post)

  1. PigMonkey
    Posted 5 years ago #

    I have a custom content type called 'rs_invoice'. There are six posts with this type. Their IDs are: 960, 950, 910, 890, 1069, and 1070.

    Using WP_Query correctly returns all of these posts.
    $invoices = new WP_Query( array('post_type' => 'rs_invoice') );

    Using get_posts returns all but 1070.
    $invoices = get_posts( array('post_type' => 'rs_invoice') );

    Why would WP_Query and get_posts, given identical arguments, return different results?

Topic Closed

This topic has been closed to new replies.

About this Topic