What a WordPress theme consists of

Each site element is a separate file uploaded to the server. The site files tell the browser how to display the information on the user’s screen. And when a user visits a page on your site, WordPress loads the appropriate templates (files) based on the request.

The theme contains two main files:

index.php – the main theme file, which is responsible for displaying the page content;
style.css – the main styles file. All .css files are responsible for the appearance of the elements of the future site: their size, color, etc.
Any site can be visually divided into blocks. For each block will be responsible for a specific file within the theme.

Consider the main elements of the page:

  • Header (header) is located at the top of the page. File header.php is responsible for the output of the header.
  • Footer (footer) is at the bottom of the page. For output footer file footer.php.
  • Side parts (widgets). For their output is responsible file sidebar.php.

In addition to the main elements can be dozens of others. It all depends on the requirements for the site. If you need a block with comments, it will use the file comments.php, if the page will be located posts, the file single.php. There are many options for PHP-files.

Thus, the theme in WordPress is responsible for how the site will look to the visitor. To add additional functionality to the site (polls, forums, search engine optimization) use WordPress plugins.

© 2024 Child theme Configurator - WordPress Theme by WPEnjoy