In the blog post, I will guide you through the process of setting up a static homepage for your WordPress blog when using the default TwentySeventeen theme.
The process of setting up a static homepage for your blog is straightforward. follow the steps below to make it happen:
Step 1: Upload your static homepage
The first step will be to upload your static homepage into your site, to do this you’ll have to FTP or SFTP into your blog, you can find the information on how FTP into your blog from your hosting provider and you can use a program like FileZilla or Cyberduck to FTP into your blog.
After you connect to your blog via FTP/SFTP go to the themes folder of your WordPress installation, usually it is located at htdocs/wp-content/themes/<theme_name> as we are editing the default “twentyseventeen” theme in our case the theme_name will be twentyseventeen htdocs/wp-content/themes/twentyseventeen
Then in this folder, there will be a file named front-page.php, rename that file to front-page-old.php, if we don’t rename this file then WordPress will server this page as the homepage, so we have to change the name of the file from front-page.php to something else.
After you have renamed the file, create new file name page_home.php in that folder, and paste the following contents into that file:
// Template name: Static Front Page
After the ?> tag paste the html content of your homepage in this file and save the file.
Now go to the htdocs folder and upload all the other static HTML pages you want to upload and CSS files associated with your homepage.
Step 2: Updating Settings in WordPress
Login to your WordPress Admin panel, Go to Pages->Add New, and create a new page with title Homepage and from the Page Attributes section select the Template as “Static Front Page” as shown in the image below, and save the page.
Then we will also need a page to show our blog posts, Go to Pages-Add New and create another page, with title Blog, and edit the permalink of the page to /blog.
Then go Settings->Reading and in the section where it says “Front page displays” select “A static page” and from the drop-down select “Homepage” as the front page and “Blog” as the Post page.
Step 3: That’s it!
Following the above simple steps, you can setup the static homepage, let me know if you have any questions in the comments.