Dumb Questions Ahead:

  • If index.php and archive.php are practically the same thing, what's the point of having archive.php?
  • When should I ever want to use archive.php over index.php?
  • If I use front-page and Blog, it doesn't switch to archive.php which you might expect to and then use index.php in the place of front-page.php.

index.php and archive.php might be the same but don't have to be the same. index.php will display your blog post archive and in the absence of archive.php (or other more specific archive files) it will display your date, author, etc. archives as well. But it doesn't have to.

You can, if you want, display your archived differently that your main blog index. That is the point of those specialized files-- they allow you to alter the look of specific pages without having to write complicated conditionals into the index.php file.

The difference between the two files is what you make of it. That difference can be a lot or none.



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.