After this tutorials you will be able to know the Required Theme Files in WordPress. When you are going to create your custom WordPress theme then you must make sure that certain files are required. There are several standard template files that recommend by WordPress.
1) style.css
2) index.php
3) header.php
4) footer.php
5) comments.php
6) screenshot.png
Read :
How To Create a Custom Page Template in WordPress
Creating a Custom WordPress Widgets
Easy Steps To Create a WordPress Plugin
Style.css page include all information about your theme like theme’s author name, theme url, theme version number, theme description, and it’s header. See the bellow example :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
/* Theme Name: Twenty Fifteen Theme URI: https://wordpress.org/themes/twentyfifteen/ Author: the WordPress team Author URI: https://wordpress.org/ Description: Our 2015 default theme is clean, blog-focused, and designed for clarity. Twenty Fifteen's simple, straightforward typography is readable on a wide variety of screen sizes, and suitable for multiple languages. We designed it using a mobile-first approach, meaning your content takes center-stage, regardless of whether your visitors arrive by smartphone, tablet, laptop, or desktop computer. Version: 1.3 License: GNU General Public License v2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Tags: black, blue, gray, pink, purple, white, yellow, dark, light, two-columns, left-sidebar, fixed-layout, responsive-layout, accessibility-ready, custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-images, microformats, post-formats, rtl-language-support, sticky-post, threaded-comments, translation-ready Text Domain: twentyfifteen This theme, like WordPress, is licensed under the GPL. Use it to make something cool, have fun, and share what you've learned with others. */ |
Main template files in your theme. This template will be for your website’s home page. You can put static or dynamic content according to your needs.
This file will be used to define the header parts of your website such as navigation mennu, logo, socail media icons, etc
This file will be used to define the copy rights text or you can also put some wordpress widgets according your website needs.
You can design comment section according your website look and feel.
The screenshot.png acts like a visual indicator of your theme’s looks like. This must be larger than 1200x900px in jpg or png formats.
Do like and share with your friends if you like.
If you like FreeWebMentor and you would like to contribute, you can write an article and mail your article to [email protected] Your article will appear on the FreeWebMentor main page and help other developers.
Article Tags: Tutorials, Web development, wordpress, wordpress theme