Welcome to the first ever 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: This has been updated to show how to set a Wordpress page as your homepage for WP 2.7.1

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 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!
 

  • Share/Save/Bookmark