WordPress is one of the most popular CMS in the world. With its help, you can create sites of various nature and manage them without knowledge and programming skills. CMS (Content Management System) is a content management system on the site (creation and publication of posts, placement of widgets, design changes, arrangement and display of various elements, etc.). Everything that forms the site as such is created and edited using the CMS.
What is a WordPress theme?
A WordPress theme is a collection of files that are responsible for the look and feel of a website.
After installing the theme, all its files are automatically downloaded to the hosting. The task of the theme is to display content on the site in a user-friendly way. With the help of a theme, you can choose the site structure that suits you and insert the necessary information there.
- displays the content of the site on the screen;
- indicates what content will be displayed for different users;
- is responsible for adaptability for different devices (monitor, smartphone, etc.);
- uses any design elements (pictures, videos).
In other CMS, the finished site design is called templates. In WordPress, the template we are used to is called a theme, and already inside it are templates (site files). Thus, a WP theme is a collection of templates. Each file (WordPress template) is responsible for displaying certain content (posts, images) on the site.
What a WordPress theme is made of
Each site element is a separate file uploaded to the server. Site files give the browser information about how to display 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 content of the page;
style.css is the main style 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. A specific file within the theme will be responsible for each block. Let's consider the main elements of the page:
- The header is at the top of the page. The header.php file is responsible for displaying this header.
- The footer (footer) is at the bottom of the page. The footer.php file is responsible for displaying the footer.
- Side parts (widgets). The file sidebar.php is responsible for their output.