How to get the all post from two custom post types?

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?

Leave a Reply

Your email address will not be published. Required fields are marked *