Blogging Experiment

Using a WordPress Page as Your Home Page

Welcome to WordPress Wednesday! Each week we’ll be answering as many of your questions about the blogging platform WordPress as possible. If you have questions you’d like answered that aren’t covered here, feel free to drop them in the comment form below. With that out of the way, let’s jump right in!

I’d like to use something other than my recent posts as my home page. Is that possible within WordPress?

Note: Updated to work for 2.8.4

It’s not only possible it’s relatively easy. The first step is to create a page to serve as your new home page. For the purpose of this example, we’ll call it “My New Home Page.”

  1. In your WP control panel, select the Pages tab.
  2. Click on Add New.
  3. Give the page a title, “My New Home Page.”
  4. Create the content for your home page just as you would a blog post.
  5. Click the Publish button.

While you’re still in the Write Page subpanel, create a second page:

  1. Title this one “Recent Posts” (or whatever you want to call the page that your recent posts will appear on).
  2. You don’t need to have any Page Content for this one.
  3. Click the Publish button.

Now you’re ready tell WP to use your new page as the home page:

  1. In the Settings panel on the left navigation select Reading.
  2. At the top of the Reading Options subpanel you’ll see:Default Reading Settings In Wordpress
  3. To change the front page to your new home page, select “A static page” for Front page displays.
  4. Select “My New Home Page” from the Front page drop down menu.
  5. Finally, be sure to tell WP which page to use to display your recent posts. From the Posts page menu select the “Recent Posts” page you created earlier.Set Your Page As The Home Page For Wordpress
  6. Click Save Changes.

View your site. “My New Home Page” should now be your home page.

Note: Any Page Content you have entered for the page you designate as your Posts Page will be overwritten by the listing of your recent posts.

See also the WordPress Codex page: Reading Options Subpanel

Modifying your Pages menu

If your theme is set to display a list of your pages, the list should now contain links to both My New Home Page and Recent Posts. In the case of the Blogging Experiment Theme, this causes a bit of a problem since our menu is designed to display a “Home” link along with the page links.

default bloggin experiment menu
Here’s the code from our old menubar.php theme file:

<div class=”TopMenu”><a name=”top” id=”top”></a><ul><li><a href=”<?php echo get_option(‘home’); ?>/”>Home </a></li><?php wp_list_pages(‘depth=1&sort_column=menu_order&title_li=’ . __(”) . ” ); ?></ul></div>

To remove the (now redundant) Home link, simply delete:

<li><a href=”<?php echo get_option(‘home’); ?>/”>Home </a></li>

There’s one more problem, right now our page links are in alphabetical order. Fortunately the sort_column parameter of the wp_list_pages function in our code is set to menu_order. That means we can adjust the menu order by editing the Page Order setting for our pages:

  1. Locate the page you want to change the Page Order setting for in the Manage>Pages subpanel and click Edit
  2. The Page Order setting is at the bottom of the right-hand column.
  3. If necessary click the + icon to expand the edit box and reveal the Page Order text box.
  4. Type a number into the Page Order text box. For our example we’ll order the pages:
    1. My New Home Page
    2. Recent Posts
    3. About

Pages with lower Page Order appear first in the menu. Pages with the same Page Order are sorted alphabetically. Our menu should now look like this:

New Blogging Experiment Menu
By default, newly created pages have a Page Order of zero which will put them at the front of your menu if you forget to change it.

For more about the wp_list_pages WordPress template tag, see http://codex.wordpress.org/wp_list_pages

If you have a question you’d like me to address or (better yet) if you have a WordPress tip, trick or tutorial you’d like to share let us know!

For The Best Looking Wordpress Themes, We Recommend ElegantThemes:


Over 20 Premium Themes (and counting) For $20/yr. This Is Who WE Use!

TAGS: ,

Comments

  1. Coryan | UTurnAhead February 27th, 2008

    I’ve been working on a new website (not particularly a blog) and was about to do some research on using a static homepage. Well, you’ve done it for me. Thanks for the excellent tutorial on setting up my static page AND solving a couple of the challenges that occur (the menu tab issue). I’ve printed out this post and will use it as a guide.

  2. Dr. $hocka February 28th, 2008

    Excellent post. Look forward to seeing more of this series.

  3. Vicky February 28th, 2008

    Thanks for this. I too look forward to more. I was wondering how to change the menu after doing a static page. How do you get your photos to stop wrapping around the text in a theme?

  4. renee - 21st Century Parenting February 28th, 2008

    Thanks for posting this. Wordpress is great. But it can be tricky sometimes. Most people have no idea how to have a “hybrid” blog/static site. It’s great that you are sharing the knowledge.

    Also, the PAGES thing can be even more tricky!

    Thanks!
    renee

  5. cuzzy February 28th, 2008

    man where were you a few weeks ago when I painfully did this on my own

    thanks for the post. I look forward to wednesday’s now

  6. Mike Huang February 29th, 2008

    Great tutorial for us noobs :)

    -Mike

  7. mac March 1st, 2008

    10 votes for you! this guide is really helping me up on my sites. I already had a headache just to set this WP. Thanks a lot!

  8. Around the Net with Knup - 3/1/2008 | knupNET March 1st, 2008

    [...] Use wordpress page as homepage [Blogging Experiment] [...]

  9. Simlock verwijderen March 1st, 2008

    Why is it useful to keep or make Wordpress as your homepage? Because I think a introductional page is the best way to keep or make as an homepage. Don’t you?

  10. How to be a successful blogger » The Blogrepreneur | The Blogrepreneur March 2nd, 2008

    [...] Using a WordPress Page as your home page by Blogging Experiment [...]

  11. Pat March 2nd, 2008

    I manage a content blog and knowing how to do this “trick” was SO useful for me. People entering my website now see a static table of contents rather than the usual reverse chronological post order that makes my website NOT useful.

    BTW, Ben, your blog rules. I hope I can compete with you someday.

  12. Robin March 8th, 2008

    Thanks a lot for the trick, been weeks trying to figure out this. Cheers!

  13. Todd March 10th, 2008

    Great article, thanks. I do have a small issue though. When using a Page to display recent posts (‘Recent Posts’ as you suggested) the Recent Posts page is not highlighted in the nav when you are on that page. My temporary static index Page (Static Index Page) highlights just fine, but no dice on Recent Posts. This highlighting is the default behavior for wp_list_pages, so I am wondering why this method breaks it.

    Thanks again for this article.

  14. Jenna March 14th, 2008

    Thanks so much for this tutorial. I had an idea of how to do this, but I always like to have a guide (if possible) whenever I try something new. Especially when I’m doing something for a job, which I was with this one. You explained it perfectly and it worked like a charm first try! THANKS AGAIN!

  15. jason April 22nd, 2008

    Dude, You are the Mang!

    I had been searching everywhere for this function, downloading all kinds of plug-ins and it was right here the whole time!

    Thanks Again and I signed up for your RSS and look foward to more words of wisdom that save me time and energy.

  16. Pino April 24th, 2008

    This duplicate ‘home’ on the menu bar had been a nasty issue for a 1.5 month old newbie like me. After searching 20 odd sites INCLUDING the wp site, you gave a clear and simple answer.

    Many Thanks.
    Pino
    http://www.LanSmith.com

  17. Pino April 24th, 2008

    Do you have a similar tutorial on how to add a ‘drop down menu’ that displays sub pages off a main menu item? Like ‘Services Offered’ and under that, the list of services…

    Also, is there a way to manually sort the items appearing under ‘Pages’ widget on the sidebar?

    Thanks.

  18. Franchi May 27th, 2008

    Thanks for this tutorial. I`ve been looking on how to do this since a long time ago.

  19. Rane July 17th, 2008

    Thanks a lot for your tutorial, already found the solution in editing my WP frontpage :) so easy…

  20. Christoffer December 15th, 2008

    Thanks a lot for this article!
    I’m about to setup my very first homepage and have already installed wordpress on my server. Later on, I had some idea of building the whole homepage around wordpress. This article will help me a lot!

    Just one question, is it legal to build my whole homepage using an already known theme? I mean wordpress is open source, right? But is it legal to take a theme and modify it, to make my whole homepage look the same?

    Thanks,
    Christoffer

  21. Hal January 20th, 2009

    My theme does not have a menubar.php file. It has a ‘main’ page call in the header. I have created a top menu using create a new page option.

    Q: Is there a way to hide the ‘main’ page menu item (currently my Home page)?

    Thanks for a fine and easily understood article.

  22. Ethan March 17th, 2009

    Thank you what a great post saved me some time for sure!

  23. Kyle March 17th, 2009

    Ethan…You’re most welcome. Be sure to come back soon!

  24. Kyle April 4th, 2009

    Hey Guys…The link above that referenced us for “How To Make A Wordpress Page Your Homepage” has a LOT of good links to other WP tutorials that you’ll probably want to know about at one point or another. Definitely a good list to check out.

  25. leo chaos April 21st, 2009

    Just in case someone finds this the same way I did (trying to sort out the home button repeating your post) – I made the page I wanted as a home page, and set it as so… then went into the page and set it to drafts… which removed it from my page… except aslong as I dont play with the settings about the home page it still shows there without being repeated.

  26. Amanda July 15th, 2009

    Thank you thank you thank you! I couldn’t figure out why it wasn’t letting me chose my home page as my “posts page” and was afraid I was going to have to go into c-panel and move it all around…

    I googled and found this post and you made it all so simple. THANK YOU!

  27. JonnyM August 4th, 2009

    Is there a way of having the NEW HOMEPAGE editable through the Admin section. I have done a site for my client and they currently have a static homepage, but they will need to edit the content from time to time. Is there a work around that you could do a Custom Field or something. Sorry I’m new to WP.
    Cheers

  28. Kyle August 4th, 2009

    Johnny, I’m not sure I understand your question, but if you set a page to be your homepage within Wordpress (a page that was created within Wordpress) then you can most definitely modify that page from within the Wordpress admin panel. If the page was not created within Wordpress, and acts solely as a static html page, then no you wouldn’t be able to modify that from within the admin panel.

  29. Chris August 5th, 2009

    I actually figured this out on my own in the teaching myself WP phase, but what I REALLY want to do is have my static homepage on a different template (if that’s the terminology; i.e. to have no sidebar appear JUST on that one page, and build out more graphic elements). Is there a way to do this, maybe with a plugin, without going into the source code too deeply? I’m an HTML/CSS whiz comfortable, just not too savvy in the php.

    Linked to my staging directory, rather than my current website.

  30. Thomas September 22nd, 2009

    thank you so much! most excellent help

  31. Barbara Swafford October 8th, 2009

    Thank you so much for this. I’m working on a new blogging project and wanted to set a static home page. Like you mentioned, we can end up with two “home” pages, which I did.

    By you showing what I needed to remove from my template did the trick. Now I’m off to number my pages.

    Thanks again.

  32. Deepesh Divakaran November 16th, 2009

    Thanks a lot for the Tuts..! helped me a lot to get rid of the default theme HOME menu link.

  33. shivanshu November 25th, 2009

    thanxs a lot
    its working

  34. Nathan November 26th, 2009

    Hi, this outlines exactly what I want to do, but I can’t find the menubar.php file. I looked in all the obvious places including my theme dir and even did a recursive search of my WP directories on my server and still couldn’t find anything. has this changed names recently?

  35. Kawika December 17th, 2009

    Thanks for this post, it helped a lot! But where do I find the Manage>Pages subpanel?

  36. Cai December 22nd, 2009

    Thank you very much for the explanation.

  37. Rick December 23rd, 2009

    Thank you for this info. It helped greatly.

    Sincerely,

    Rick

  38. Dowson December 25th, 2009

    Thanks it helped !!

  39. Alex December 27th, 2009

    Thank you for this – it really helped me out – much appreciated

  40. Making A Will December 29th, 2009

    I use Wordpress as my homepage and it is a breeze to do so. The only thing that I have found is that you need to get the right theme in order to make things work nicely. However, that problem is easily solved by looking through this very blog and using the resources it contains to find just the theme that you need.

    Kind regards,

    John

  41. wptidbits January 9th, 2010

    Simply excellent explanation. I’ll try these tips at my website.

  42. Wadoki January 17th, 2010

    Excuse my ignorance, but I no idea where to fin the “menubar.php theme file” in order to delete the default Home page. Can anyone help me here step by step. Using a MacBook. Thanks!

  43. Chris January 17th, 2010

    Thank you very much for the explanation.

  44. Gianni January 22nd, 2010

    This is a great post, thanks! there is something I have been trying to achieve but with no success…is there a way to put on the main page a rotating post (let’s say ‘the best of this blog’) AND a static page so two posts instead of just one? on my site I have a featured lesson and a lesson menu, all on the same static page, and I am trying to make the ‘featured lesson’ rotate automatically (maybe when you refresh?)

  45. Jon January 27th, 2010

    Many thanks for the awesome Post! This came in very handy.

  46. door knobs January 27th, 2010

    Its really great tutorial to understand how to use wordpress as a home page! But I think its not so easy to put this thing in action.

  47. Net Success February 7th, 2010

    Thanks for posting this. I think a static homepage looks more professional than just a blog page, I will try using these techniques to my blog soon.

Add a Comment