how-to-create-wordpress-theme

How to Create WordPress Custom Theme – 5 – Setting up front-page.php

WordPress can set a single page as website’s home page or Blog page as home page. There is a setting in WordPress back-end. index.php is the default layout for all URLs if related templates not found in theme structure.

It is advisable to create template for each layouts in WordPress for example:

  • Individual page template
  • Individual post template
  • Author archive, Category archive, Date archive template

Remember the page which we set as font-page/homepage in back-end is just responsible to load the dynamic content under the_content() area. The rest page layout we need to set into a page template like the header banner, Breadcrumbs, sidebar, Footer etc.

So here we are going to front-page.php which is a pate template for font page of the theme. Keep the static HTML for now & we will change it later to dynamic content.

So here, front-page.php is the separate template for page which is set to homepage. The page.php layouts will not be affected here.