Create WordPress Magazine Style Theme easy!

It is really simple to create the style of theme you want with wordpress that you can do a wordpress magazine style homepage and theme like my homepage with almost no expertise in wordpress theming!

Until recently my hompage was a php page with only page! I did not really bother with converting my homepage into wordpress since I did not have much of a content to post there anyways. But my tastes keep changing all the time and individual php files were of no use if I had to change the design. So I posted that exact php into a wordpress theme in less than 60 seconds. How?

Introducing the is_home() tag:

The design I wanted to use was my previous theme and hence the only thing I wanted to change the way the homepage looked. Hence I add this peice of code in the top of index.php file of my theme:

?<?php

if (is_home()) { ?>

Paste the source of my static php/html page.

<?php }
else
{ ?>

leave the real index.php content here. untouched.

<?php
} ?>

What is_home does is to check if the page currently req. page is the homepage of the blog. If it is, it serves the php/html page I want to show as homepage. Else it serves the theme code! Simple.

With this you can have even your old html page as the homepage! Or better, rename it to php and put in codes to show recent posts, recent comments or even posts from your sub domain blog as I did with my TheAnand home. Hope this helps! If you are looknig for a way to learn what a wordpress theme is all about check this heirarchy by Sajith. He has a excellent post to help you get started with creating a wordpress theme.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *