The Teen Forums - Chat and more » Blogging Tips, Tricks & Advice » Wordpress Blog Tips

Wordpress: Hacking Up Your Homepage

(1 post)
  • Started 2 months ago by admin
  1. admin

    The Boss
    Joined: Oct '07

    Ever wanted to display that something extra special on your homepage? Ever wanted to display a nice welcome message on your homepage? Ever wanted to have your homepage display a summary of the sections of your blog (like mine) rather than the latest posts?

    If you answered yes to any of the above, i recommend that you carry on reading.
    Creating The Static Homepage In Wordpress
    Firstly, locate your theme folder (its easier if you download the folder and edit off-line) , then create a copy of your index.php, rename the index.php file and name it home.php

    Thats it, you have now created your static homepage, upload home.php to your theme folder (your blog will look no different at this point).
    Hacking At The Homepage
    Now its time to edit and hack at the home.php file, what i do is use the div that would usually display the blog posts on the index.php and use this to section the homepage.

    I then use the sidebar div to display half-sized sections (requires some hacking and editing but gets there in the end).

    In the image below, i have tried showing you my code without any text in, i have tried to section it for easier reading, however it may not be clear.

    Most of it is all about trial and error, just mess about with the code and upload the new file and see how it looks, remember if all goes bad, just delete the home.php file from your theme folder.
    What To Put On Your Homepage?
    Currently on my homepage i display a mixture of things such as;

    • A short review of what happened the previous month, after around a paragraph i have linked it to the full article.
    • 8 Recent Posts, that displays the title only, along with a link.
    • A featured posts, along with a post summary.
    • 5 Old posts, helping to keep some of the older (but worth reading) posts.
    • 4 highest rated posts (displayed via the wp-post-rating plugin).
    • Latest forum posts from the bbpress forum (displayed as a widget)
    • Latest comments (displayed as a widget)
    • Meta information
    • Blogroll
    • A few spaces to fill with text or ads.

    What you use your homepage for is down to you, the above should help you get some ideas, using a custom home.php file for the homepage is especially good if your after a magazine style theme look.
    Using A Custom Sidebar Too!
    If you want to go that bit extra you could also create a separate sidebar for use with the homepage, if your interested read this article.

    Posted 2 months ago #

RSS feed for this topic

Reply

You must log in to post.