I have a custom post type called Movie with rewrite slug function enabled as:

'rewrite' => array('slug' => 'movies','with_front' => true, 'hierarchical' => true ),

In theme directory I also have single-movies.php and taxonomy-movies.php

Now when I create a now CPT a URL generated like


Which is right but when I update the url by eliminating the CPT like:


There is nothing there! ( in the page) Can you plrade let me know which file is in charge of populating CPT(s) there? and what I am missing?

  • Well one option would be to create a template-movies.php file. Then go into your menus in the backend and create a new 'movies' page and assign the template file you created earlier as the template file to use? – Ashtmdu Oct 13 '17 at 16:23
  • Secondly, the solution you're probably looking for is the archive page. Simply create a archive-movie.php page in your theme root directory. WP doesn't have default templates for CPT's. – Ashtmdu Oct 13 '17 at 16:26

Create archive-movie.php containing the Loop as described in Custom Post Type Templates. Or copy and rename the archive.php file of your theme, if exists.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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