How To Wordpress - Tips, Tricks & Tutorials

Wordpress Theme Files Explained

All themes are not created equal.

Wordpress will work with a theme that has only an index.html and a style.css, but you can get penalised for duplicate content on your own site. Yes, you read it right, you can get penalised for duplication of your own original work. How unfair is that! With a Wordpress theme that has all the necessary files showing the correct information this will not happen.

I think that they should change the rules for themes and ensure that they do have all the required files, but as their own theme viewer has been down for many months it seems that they have more work than they can handle at the moment.

Below is an explanation of all the files that should be included in a wordpress theme …

style.css - this is the stylesheet which tells all the other files in the theme how to behave with regards to colours etc … and must also contain the information about you and your theme in the header

an example of the header is …

/*
Theme Name: XXX - Version 1
Theme URI: http://www.onthenetdollars.com
Description: 2-column widget-ready wordpress blog theme
Author: Kelly Ifrah
Author URI: http://www.onthenetdollars.com
*/

index.php - if this is the only file in the theme then it will contain all the necessary calling of tags (wordpress works on special tags being called from the database), but it should not be and should only hold the main content calling of tags and should also use the the_excerpt tag and not the_content tag to avoid content duplication

(the the_excerpt tag shows just part of the post and the the_content tag shows the full post)

comments.php - this is the file that tells the comment box and comments posted how to be shown

comments-popup.php - this file is only needed if the blog owner decides to use a popup comments box

single.php - this is the file that shows just one post when the permalink is clicked from another page or when someone goes there from a search

page.php - this is the file that shows an individual static page on the blog like the About Me page

category.php - this is the file that will show all all posts in a category and should use the the_excerpt tag and not the_content tag to avoid content duplication

author.php - this is the page that will show the details about an author

archive.php - this is the page that will show a category, an author, or a date and should use the the_excerpt tag and not the_content tag to avoid content duplication

searchform.php - this is the file that holds the form that is the search box, but it is included as a widget now in wordpress 2.5, so you will only need it if your theme is not widget enabled or if you want the search box to be in the main body of your blog and not in a sidebar

search.php - this is the page that will show the search results (you should be monetising this page and changing it every so often as this counts as new content)

404.php - this is the page that will show when someone does a search for a page that is not there (you should be monetising this page and changing it every so often as this counts as new content)

Leave a Reply

 

Clicky Web Analytics