Setting up the blog template – lesson 24
To properly set up the blog, we need to copy the file index.php and rename the copy to front-page.php. The file front-page.php will serve to specify the new front page of the blog, a page index.php we will use to display the blog.
Change the content of the file index.php and copy the code from the file there archive.php. After changing the index.php file, we need to change the setting of the main page and the post output page. Go to Settings -> reading -> specify page for home page and a blog page, as shown in the picture below.
After all the changes, your main page should remain the same, and the blog page will now display the latest posts.
In the next post we will start learning something new, and now we will refine what we have already studied. I decided not to dwell on what has already been studied and posted the finished code.
What do you need to improve in your theme
- Add files from my archive: tmp-twocolumn.php, tmp-twocolumn2.php.
- Delete files at the root of your site: twocolumn1.html, twocolumn2.html.
- In file functions.php I have added the code for two new sidebars, I think it will be correct if you just replace your file functions.php to mine and continue.
Be sure to check out the code for these new templates and consider the code I wrote for the new sidebars in the file functions.php. It will not be superfluous to repeat the material covered on your own.
You also need to create new pages to test new templates, add your missing pages.
Customize your pages with appropriate templates.
As before, add new pages to the top menu.
Check how the created templates work, carefully study the code of each. In the next lesson, I will look at creating a new data type., we need it to create a portfolio.
/*
- Basic web design course;
- Site layout;
- General course on CMS WordPress and continuation of the course on template development;
- Website development in PHP.