What url will cause wordpress to use archive.php?

I have a blog with two post types. One is default ‘post’ and the other one is custom post type ‘video’. In permalink options I choosen ‘custom structure’:

/posts/%postname%/

I created ‘archive.php’ in the theme directory. I supposed that url ‘/posts/’ should cause wordpress to use ‘archive.php’ as template for posts loop page. But I’m getting ‘Page not found’ title with ‘index.php’ as template file. How to fix it?

Read More

By the way, url ‘/videos/’ chosen for videos by setting option

'rewrite' => array('slug' => 'videos', 'with_front' => false)

in the ‘register_post_type()’ function uses ‘archive-video.php’ as assumed.

Related posts

3 comments

  1. I’ve developed with WordPress for a long time and I realize I’m wondering the same thing. The documentation of the archive.php page doesn’t actually address this issue. It should list the url structures that are potentially used by the template page.

Comments are closed.