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.

wordpress настройка страницы блога и главной страницы

After all the changes, your main page should remain the same, and the blog page will now display the latest posts.

wordpress post listing

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.

zip wordpress theme archive

What do you need to improve in your theme

  1. Add files from my archive: tmp-twocolumn.php, tmp-twocolumn2.php.
  2. Delete files at the root of your site: twocolumn1.html, twocolumn2.html.
  3. 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.

wordpress new page

Customize your pages with appropriate templates.

wordpress check themplate for new page

As before, add new pages to the top menu.

wordpress create new paegs

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.


Buy WordPress hosting
WordPress tutor
Online tutoring services. List of courses I teach
  • Basic web design course;
  • Site layout;
  • General course on CMS WordPress and continuation of the course on template development;
  • Website development in PHP.
Read more on the page WordPress tutor
*/

Nikolaenko Maxim

Director of web studies ProGrafika. I am developing, website design and promotion. Always glad to new blog readers and good clients.


You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

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

Templates for WordPress
The best hosting in Ukraine
Stable hosting for Drupal