Ok. Its actually not too complicated of a conversion. You just need a push in the right direction.
Open up the html source of your current site. Now, I’m assuming that everything up until div id="main_content" is going to be the same on every page and that everything after div id="main_content" is going to be the same. Even if those assumption are wrong the following should give you the right idea.
- In your theme folder, create a new folder named “schaumann_theme” or whatever you want.
- Copy the html from your existing site from the top to
div id="main_content", paste that into a new file named header.php, and save it to the theme directory you just created.
- Do the same with everything below
div id="main_content" but save it as footer.php.
- Now copy
div id="main_content" and save it as index.php in your new theme folder.
- Copy your stylesheet into the new theme folder but you need to add some identifying information to the top of the file as explained here.
You should now be able to activate the theme and have a site that looks much like, maybe not exactly like, the site you have now (but of course without any dynamic functions). That comes now.
- Add
<?php wp_head(); ?> right before the </head> in your header.php file.
- Make sure your
<body> tag looks like this:<body <?php body_class(); ?>>— well, you don’t really have to do that but it makes some CSS very convenient.
- You might want to widgetize the little navigation section, but maybe not.
- You definitely need to do is convert the static html inside
div id="main_content" into a Loop. If you look in the default theme you’ll see a line that reads <?php if (have_posts()) : ?>. That and everything through <?php endif; ?> is the Loop in the default theme. You can copy that into your div id="main_content" and get a start. You’ll have to modify the formatting.
- Add
<?php get_footer(); ?> to the end of your index.php file.
That should get you started but there are lots and lots of little functions that I haven’t mentioned so don’t think this is a comprehensive tutorial. I’m kind-of assuming that you have some familiarity with PHP and understand opening and closing tags and such. Also, relative links are very unreliable inside a WP theme. It has to do with the virtual file structure that WP presents to the world. Use the bloginfo() function to create absolute URLs.
And check back later. I’ve probably forgotten something. I’ll remember or someone else will notice and fill in the blanks.
Mate, you are a champion, thanks so much for your advice! I do have some understanding of PHP so I should be able to follow your advice pretty well. I’ll give it a go on Monday when I have some time; thanks again!!