WordPress is most popular and easy theme development software in this world. Let’s have a look at some of the most common files WordPress recognizes by default that we’ll be dealing with. Most files are self-explanatory by their name. So let’s start


header.php
Normally this file contains our theme up until </head>, it also plays home to the wp_head()function, which is one of the most essential hooks in WP.
sidebar.php
An optional file called by the use of get_sidebar(), You can use this file for a sidebar, navigation of anything similar. This is also where you will usually include the code to allow widget to run, if your theme allows them.
footer.php
This is where the theme wraps up and also where you can register a second area for widgets to display. Of course you can display widgets anywhere you want, but sidebar and footer are the most common.
Page.php
This is used to display a single page –not to be confused with a post.
Single.php -This post file used to display a single blog post but very similar to page.php in code.
Index.php
As you can probably guess, index does the chunk of the work for a blog; displaying posts, search result, serving up error messages and so more.
Functions.php
The functions file may be new to you. This is where theme specific functions are stored-most commonly the functions to registered widget ready area.
comments.php
Displays a loop similar to index.php which iterates through comments. This is also where trackbacks, nested comments and other related functionality is performed. A Theme can use as many or few theme files as desired, but these are the files most common to almost every theme. Theme files structure is essentially the decision of the theme developer. That here example there could be vimeo.php, youtube.php and audio.php that display their respective post types rather than having all of the code bundled in to one page.php or single.php.
Making your theme customizable with an option page:
A dashboard option page that allows easy customization of a theme can be a deal maker. A vast majority of popular themes have some sort of options panel that alleviate any need for the blogger to ever have to modify any code of graphics files. This is a great selling point, as not every blogger who uses your new theme will know that #000000 means black. Option pages can be a simple one page layout with a few checkboxes, text areas and sliders, or they can be and entire admin panel within the dashboard featuring multiple pages to control many different elements of a theme. Typically options pages allow customization of elements such as;
·       Color scheme
·       Logo
·       Favicon
·       Details for social media streams(such as twitter username)
·       Various style options
·       Many more

It’s impossible to list all of the options, as each theme is different from the last and requires different optional extras. While a small personal theme may not require a full blown options page, it’s important to remember that a majority of bloggers are not tech-savvy.

Post a Comment

Previous Post Next Post