WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My WP 3.6 has created a custom template using register_post_type() named movie. I inserted few movie via Admin Dashboard > Movie. For Permalink, I have set to Post Type, therefore, for example, movie1 (instance of Custom Post Type movie), the URL is:


If I want to show a list of movie with link http://example.com/wordpress/movie/, which custom template file has to be created?

I already have single.php, single-movie.php for displaying the movie1. But how about a list of movie ?

share|improve this question
up vote 1 down vote accepted

Firstly, there is the archive-POST_TYPE.php file, so in your case it would be archive-movie.php.
You find more information on that (and all the other templates) in the Template Hierarchy.

Secondly, you can just list your custom posts anywhere you want, using a separate query:

$args = array(
    'post_type' => 'movie',
    // maybe put some other settings here as well
$movies = new WP_Query($args);
if ($movies->have_posts()) {
    while ($movies->have_posts()) {
        // now work with `the_content`, `the_title` and the like...
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.