Consulta WordPress para tipos de postagem personalizados

<?php

$postTypeToQuery
= "examplemovies";

$args
= array( 'post_type' => $postTypeToQuery, 'posts_per_page' => 10 );
$loop
= new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post();
?>

<div class="post">
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> </h2>

<?php the_content(); ?>

</div>
<?php
endwhile
;

?>