I've pre-built a front page for WordPress using PHP, JS, CSS and resources found in other files. The whole page setup is 23 files (1 .php, 1 .js, 2 .css, 2 .otf, 17 .svg/.png/.gif) and 2 folders.

Essentially I want to override the default front page with this new one that I've made. It needs to remain as files, so having it as a static page won't work. I want to avoid turning it into a theme at all costs, because it's really not necessary.

How shall I go about completing this?

1 Answer 1


As shown in the template hierarchy image from the documentation, you can name your .php file as front-page.phpor home.php.

By default, WordPress sets your site’s home page to display your latest blog posts. This page is called the blog posts index. You can also set your blog posts to display on a separate static page. The template file home.php is used to render the blog posts index, whether it is being used as the front page or on separate static page. If home.php does not exist, WordPress will use index.php.

  1. home.php
  2. index.php

Note: If front-page.php exists, it will override the home.php template.

See the image below:

enter image description here

  • Thank you, this has resolved my issue. I do recall reading somewhere that renaming it to home.php somewhere would fix it, but apparently there was a front-page.php located in the theme's root that was overriding that. Renaming my index.php to front-page.php and dropping it all into the active theme's root solved the issue (after changing the other files pointers).
    – Zion Fox
    Jul 25, 2017 at 16:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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