The first thing that I learned about wordpress themes is what happens behind the scenes. In order for the the code to work the server its placed on must run the wordpress service. This allows for certain function calls to be recognized, such as bloginfo(). Once you determine where the theme will run, the code is fairly simple. Using a combination of html, css, and php you can create a theme fairly easily. In fact it really on requires two files, the style.css and the inde.php file.
The style.css file is a basic style sheet file that will control the overall look and feel of the theme. The one thing that I am not clear on from reading several articles on the subject. Its not really clear how you actually add the styles to the index.php files to control the visual look of the theme. I presume that you would just wrap each portion of the page in <div> tags and use headers in the css file.
The index.php file is basically the core file and would be what us displayed in the browser. In this file it will check check to see if there are any posts to be displayed. It does this by using one of the most important part of the code for the theme, the WordPress Loop. This loop fills out all the appropriate information for each article, such as the title, the time it was posted, and the number of comments. This file would also be where we would include the header and footer files for the theme.
In the header file will be displayed on the top of every page within wordpress theme. This would include the opening portion of the html code for the theme, including the reference to style.css. It also includes a list of links that would be used for persistent navigation on each page. Also included would in the index file would be the footer file.
At the bottom of the page would be the footer portion the theme. This is a simple file that may include the theme author, as well as the blog information, and the copyright info. This would be persistent on each page just as the header file would. The css, index.php, header.php, and footer.php are the files that would be included in the simplest of of themes.
More complicated themes may include more files then the standard theme. One file that may be included is a php file for the sidebar. This file can be used to allow widgets to be used in the theme. Another file that may be included would another php file for comments. This allows other users to post comments regarding a post. In order to keep the post and comments listed and easy to search for you can also include a archive.php file.
Once these having all of these in the correct directory on a server running the wordpress server everything should work.









