Most important theme templates files for WordPress

WordPress files
Main templates file names of WordPress to create theme and to accept new theme into WordPress Theme directory or repository for free.

Here is sweet list of main theme templates files of WordPress Blog without which creating a theme is very hard and useless. Useless because without these files your created theme wont be accepting in WordPress Themes directory, if you are trying to create for repository.

Also before creating and coding lines for any WordPress theme, make sure that all the important files (mentioned below) are present and also every line in file is updated with latest code.

What is WordPress?

If you are here it means I don’t need to waste my time on explaining what is WordPress, as you already know it.

Still, in-short I can say –

WordPress is awesome blogging and content management software (CMS) that allows to create dynamic webpages that can be updated without any coding knowledge.

Which are main theme templates files ?

There are total 12 templates files which are crucially important for WordPress with 11 scripted in PHP and one made in CSS use for styling.

Starting from Top to Bottom alphabetically listed in Image aside:

#1. 404 Template (404.php):

404 Template is nothing but an error page which say that page doesn’t exist or you have landed on wrong page. It occurs whenever you searched or enter wrong URL on blog or website.

You can have option of soft redirect here by giving 302 (permanent redirect) command to browser and send to any particular page or even homepage.

As per SEO, it is strongly recommended to have well design 404 page with important weblinks for easy navigation.

Related:  WordPress 4.1 released with Twenty Fifteen Theme

#2. Archives (archive.php):

Archives theme file is used to show post or articles archive. It have all archive of post under particular category, tag, author or date. Each archive page has same number of preset post in Dashboard> Settings> Reading> Blog pages show at most.

#3. Comment (comment.php):

Comment files is mainly used for commenting and discussion on the post you have made. It allows the visitor to comment, ask questions, support and also answer their queries.

#4. Footer (footer.php):

Footer files have all footer credits and links, even a footer-bar if included and registered in function.php file present. This area is generally used for mentioning credit links and copy write statements.

#5. Theme Function (function.php):

Theme Function file is most important file that control entire WordPress theme. To include any functionality in your theme, you have to register that functionality in function.php file. Once registered it will be available immediately for use.

Note: Edit Function file carefully, you may lose your website until you sort out were actual problem had occurred.

#6. Header (header.php):

Header file have <head> text and image logo of website or blog, along with navigation bar may be on or two depending on design. Header is one of the main theme file and also the first file to execute on server request.

#7. Main Index Template (index.php):

Main Index Template is home page of mainly all new blogs (some may prefer a static front page) rolling out.

Related:  WordPress Twenty Sixteen Theme Demo and details

#8. Page Template (page.php):

Page Theme file is a static page content which remains intact in your WordPress blog. Pages like About, Contact, Privacy, etc are created in Page Template.

#9. Search Result (search.php):

Search theme file decide how your search result should be displayed on your website. And how your search query should be executed on request.

#10. Sidebar (sidebar.php):

As you can see there is a single sidebar at right side on this post. You may have option to add predefined or custom widgets in sidebar. You can have more than one sidebar on each page as per your requirement.

#11. Single Post (single.php):

Single Post theme file is main post or articles file if you have created a blog. This is dynamically change its position on new post on main index page.

Single post theme consist of title at top, Meta content like date, post author, comment and categories, main post content, tags and then comment template file.

It is different from Page Template as compared, with no meta content.

#12. Stylesheet (style.css):

This is main theme file which have all designs stuff like, division, class, attributes and parameters of your complete WordPress blog. If you want to customize and make your blog more colorful you should have some knowledge of CSS.

Note and Conclusion:

These are most common and most important theme template files in WordPress theme. Make sure that all the written codes are up-to date to get your theme in WordPress directory.

You may also like...

Leave a Reply

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