WORKS

'post', 'post_status'=>'publish', 'post_type' => 'work', 'posts_per_page' => -1 ); $the_query = new WP_Query($args); $paged =0; if ( $the_query->have_posts() ): ?> have_posts() ): $the_query->the_post(); $paged++; ?>