There are many ways to customize WordPress (change the design) and integrate it with your existing website. I used WordPress 2.1 and integrated it with existing website, which uses Template Toolkit. Tempalte Toolkit is a very nice alternative to database-driven websites (or blogs) and I will disucss that in a spearate article.
The documentation at codex does a nice job of explaining what to do, albeit not in one place and in a concise form, which is the reason for this article. So, if you would like to change the appearance of your WordPress site or blog, read on.
There are two ways: simple and not-so-simple. The second option requires the knowledge of HTML (because you will be dealing with PHP files that constitute a given theme.
Simple
If you are satisfied with one of the themes that ship with default WordPress installation, you might wan’t to customize that theme (or download the one that you like and customize that one). This involves changing alsmost nothing. Maybe you would change header color, font color, modify style a little. You can do all that from within your WordPress admin. That way, you can only change things that theme author intended to be changed. Should you want to change more, read on.
Advanced
Maybe you already have a site, and all you want is to “add” WordPress to your site. This is what I did with two sites. This one and another one. WordPress is really easy to use for “regular Windows Word” people, so it is a great tool to update content on someone’s website, even if they don’t blog. One example is Miha Debevec’s site. So where to start?
- Find a theme you would like to change or start from WordPress classic or WordPress default theme provided with the default WordPress intallation.
- Themes are located in wp-content/themes directory. So, copy the whole directory and give it a name. For instance, MyTheme
- WordPress uses style.css file to find information about your theme, so be sure to modify the commented header in this file.
- Change the name of the theme, theme URI, author and so on.
- You can also provide the screenshot of the theme, which is shown in the site administration GUI. You can do that at a later stage as well, when you will be able to take a screenshot of it.
- Customize header.php, footer.php, sidebar.php and style.css.
- Your theme should look different already.
Now, you might not be satisfied with how your posts look, with all the meta data there, you might wan’t to display your archive differently or something else. You will want to modify the following files:
- index.php for the first, default page
- archive.php for all sorts of archive pages
- comments.php for how the comment form is displayed and how comments are displayed.
Things to note:
- if you are integrating with an existing site, you probably don’t want to have a CSS file in two places. I suggest that you use the “static” site’s CSS file, so be sure to reference the site’s CSS file in header.php.
- maybe you wan’t your RSS link on the rest of your site. Just add the RSS link (in the <head> section of your HTML files). The link to RSS is like so: your.hostname.com/[wordpress installation directory]/?feed=rss2. If you have WordPress installed in the root of your hostname, that means that your RSS link will be your.hostname.com/?feed=rss2.