30 Simple Steps To Do:
- Setup development environment like XAMPP or WAMP from http://www.apachefriends.org/en/xampp.html
- Create a database in phpMyAdmin for the new install.
- Install WordPress from http://codex.wordpress.org/Installing_WordPress.
- Create theme folder in /xampp/htdocs/WP-installation/wp-content/themes/name-of-your-theme.
- Create style.css, index.php, header.php, sidebar.php and footer.php in “name-of-your-theme” folder.
- Now type localhost/name-of-your-database and start to follow wordpress installation wizard, when finished, Activate your theme from wp-admin/themes and your website of blog should be empty white page. For now…
- Copy-paste the content from original template to these files in step 5. I recommend to use Eclipse for editor you can download from http://www.eclipse.org/downloads.
- Still your website will be white (empty).
- Paste html code from your original template to the index.php and you should see the content. Still rough, but he is there.
- In style.css you need to enter /* Theme Name: ‘ ‘ , Author: ‘ ‘ */
- You need to fix all static image paths in the style.css file.
- Now organize images in name-of-your-theme/images, if doesn’t exist in the theme, create it.
- Fix styles path, in the head html tag and it should look something like these:
<link rel=”stylesheet” type=”text/css” media=”all” href=”<?php bloginfo( ‘stylesheet_url’ ; ?> />
- Add other styles/js if there are any.
- Now, you have all images, text, styles, etc, but all these elements are static. You have to write some code and make theme editable and dynamic.
- Change all static information in header.php <head> tag:
- Move content from index.php to home.php or front-page.php if you want to create a landing page.
- Edit index.php
- Get content from header.php and footer.php and place the code in index.php.
- Now you have landing page with content from “Home” and if we go to some inner page, you will see the content from inner pages
- Delete static content.
- Edit index.php, remove all content and add this :
- Create a Blog.php file, which will be used for Blog Templates and use WP_Query to display all posts.
- Define sidebar, in functions.php.
- Add sidebar to a page.
- Define menu. Call it a few times or use register_nav_menus for several menus.
- Add the menu to a block in the markup, theme_location is sufficient.
- Call comment_form() or comments_template(…):
- Once you’re ready with the theme, you could:
–Add some complex plugins for more functionality
–Integrate some APIs to social networks or remote services
–Work on the next theme of yours
- Cheers 🙂