In most cases, a commercial website needs to have a unique home page that represents the main objective of the business or service.
With WordPress, the default home page is a list of blog posts, this isnt ideal when you need to direct your users attention to something specific. Assigning a custom layout for your home page is quite simple and there are a few methods to achieve a unique home page in WordPress.
If within your theme directory, you have a file named front-page.php, WordPress will use this as the default layout for your home page. With the help of Html and CSS, you can customise this file to anything you like.
2. Custom page template
In WordPress you can create different page templates. This will allow you to choose which page template to use for each post or page. You can then select which page to use for the home page under settings >> reading. Then whichever page template you selected when adding the page will be used to display the content.
To add a custom page template you need to upload a file and add the following comment to the page:
<?php /** * Template Name: Template name * Template Post Type: page, post
Information on WordPress page templates
Its important to note:
- The front-page.php file will override all other layouts.
- Using a custom page template to display a custom home page can cause duplicate content issues because this very same page will also be visible as a normal page.