Create wordpress theme
When creating themes for WordPress, it is important to follow a hierarchy of files because, for each section of a WordPress site, there is a file that takes care of creating the content. For example, the single.php file is the template that manages the articles, the functions.php file contains all the useful functions to extend the WordPress core, the comments.php file manages the comments and so on. Here is a list of the files that should never be missing in your theme:
-index.php, the most important file, without it our theme would not work.
-style.css, this file contains, in addition to the information of the theme, also the css code that manages its appearance
-header.php, the file where to upload the upper part of the theme.
-single.php, the template that will take care of viewing the posts.
-page.php, the template that will take care of displaying the pages.
-comments.php, the template that will display the comments.
-archive.php, the template that will display the categories.
-search.php, the template that will display the search results.
-sidebar.php, the sidebar of our theme.
-404.php, error page, in case the page does not exist.
-footer.php, file where to insert the final part of our theme.
-functions.php, the file in which you can insert all the useful functions to extend the WordPress core.
But you can skip the technical part and converts your existing website into a optimized custom WordPress Theme Read more