How to get the all post from two custom post types (team, work) using WP_Query?

This is my code:

$args = array(
    'post_type' => 'team',
    'post_per_page'=>-1
);
$query = new WP_Query( $args );

Read more here: How to get the all post from two custom post types?


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: