The choice of theme is certainly the most important and delicate moment when you must create a site
the web. Many times we rely on a Template (template), but not always able to satisfy completely
our needs. It is not unusual to modify some parts of the theme to customize the appearance
chart or add additional functionality.
If you install an advanced theme can be done from the Admin Panel, otherwise you need to put
the code and modify it. For this it is essential to know the basic elements of a WordPress theme.
A WordPress theme consists of a folder that contains the template file. The two files absolutely
needed are index.php and style.css.
The first contains the basic style and theme information while index.php is the basic layout, and
represents the fallback file when there is no other template files. We find header.php that
show the header of the site and the navigation menu, and footer.php contains footer instructions
and closes the HTML tags.
Among others there are file sidebar.php template, which controls the display of the sidebar,
comments.php, and comments. It is possible to have a single.php file to view a single post
and a page.php file for the static page. The functions.php file handles the functionality of the theme.
The loop is the core of WordPress, PHP query that communicates with WordPress and it returns
the requested content, and is located in the theme’s template file or in loop.php. The following infographics
below will help you to better understand the relationship between files and layout. As you can see, the theme
has been divided into four main sections. Each of them has a corresponding template theme files
WordPress:
Source: Graphicmedia