Project Zero

Custom Front Page

By default, WordPress displays your main blog archive as your site’s home page. If you have a home.php file, your site will use this when choosing what to display. Alternatively, it will use index.php.

You can override this setting to show a static page as your home page instead of a blog archive. You can choose any page in your site, and the appropriate template will be selected from your theme.

One such template is front-page.php, which is the default template for your site’s front page. You can use this to create a specific layout for your blog posts, or you can use static page content, such as one created with Elementor or another page builder. If you are using a static page and not your posts, and you don’t have a front-page.php file, your site will search through the Page Templates in the Template Hierarchy.

If you want to create a custom front-page.php template, you can create a file from scratch or save the appropriate file (home.php or index.php for blog posts, page.php or other page templates for static pages) as front-page.php and edit it as you wish.

Since front-page.php is a WordPress Template file rather than a custom template, you do not need to do anything to apply the file to your content. Simply saving it in your theme will suffice. However, you will need to go into your Settings and select Reading, where you can select the page you wish to display.

You should also have a page for your blog posts which WordPress will automatically populate, so any content you enter there will be ignored.

Join the conversation

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.