Ask P3: Using WordPress to build a website with a static home page

Answering your questions on social media, search engine optimization and wordpressI’ve had the pleasure of teaching a month-long course for small business owners and marketing executives that demonstrates, hands-on, how to use WordPress to build and manage a complete website. My students have some amazing projects and continue to amaze me with creative uses of WP’s content management tools and excellent questions about usability and SEO. I’d like to share a common question about WordPress.

I installed WordPress on my domain and added a template that gives my site the look and feel of a business, but my home page is still my most recent blog posts. How do I create a real home page?

It’s a common question when you start using WordPress as a full-out CMS instead of blogging software (or in conjunction with a blog). Although it’s been answered elsewhere, I’ll also cover it here.

Note: Some themes automatically shift your most recent blog posts to another page without taking the steps below, so you might want to check if your theme supports this option before you start working.

If your theme is a standard theme that defaults to recent posts, here’s how to create a static page for your home page. We’re using Mystique for this example.

Log into your WordPress dashboard. Under your Pages menu, click to add a new page. The WordPress editor opens.

We’ll create the home page first. Add a title and any content that you’d like to appear on the new, static home page.

Creating a static home page in wordpressWhen you’re finished, click publish. Of course, you can always make changes later.

Next up, let’s create a page to hold all of our blog posts.

Under your Pages menu, click to add a new page. The WordPress editor opens.

Add a title for your blog page – “blog” is a good choice, but you might also consider “recent news” or “latest updates” depending on how your target market feels about the credibility of the dreaded B-word.

Unless you want content to appear at the top of the blog page above the posts, you’ll want to leave this section of the site empty.Creating a blog page for your WordPress siteWhen you’re finished, click publish.

Now let’s tell WordPress which page goes where.

Selecting a static home page in WordPressUnder Settings, click Reading to display the Reading Settings for your WordPress site. The default setting is that the front page displays your latest posts. Instead, let’s click the radio button for a static page. We’ll set our front page to Home and our posts page to Blog (or whatever name we chose).

You can also change the number of posts the posts page will display (the default is 10) and the number of posts that will appear when folks subscribe to your RSS feed (again, the default is 10). You can show your RSS readers the full text of each blog post or a summary – there are pros and cons to both options, but we’ll save that for another blog post.

You can also change the encoding of your blog pages and feeds. Unless you know that you need to change it, you’re best leaving it set to UTF 8.

After saving our settings, let’s go to our site and see what we have.

Our new static home page in WordPressAnd now, let’s see what we get when we click on the Blog page.

Our new blog subdirectory page in WordPressLooks like we’re all set!

Delete extra home page link in WordPress themeBut, what if your theme has a link to Home hard-coded into the header? When you add a Home page, you might end up with two home links in the header. If we apply the Jarrah theme, we end up with two home page links.

Although there are a number of different ways to fix this, learning how to exclude pages from your navigation is a handy trick, and we’ll use it here.

In your Dashboard, click under Appearance > Editor. Click on the right-hand side to edit the header.php file.

Although every template is a little different, we’re looking for the part of the code where our theme creates our top navigation. Where our code says

wp_list_pages(‘title_li=&depth=2&sort_column=menu_order’);

we want to change it to

wp_list_pages(‘title_li=&exclude=’);

where we’ll add the page numbers that we want to exclude from our navigation. In this case, our home page is 2, so our code will read

<?php wp_list_pages(‘title_li=&exclude=2′); ?>

Remove home link from top navigationWe’ll save our changes and refresh our home page to see the change.

To determine what the page number of any given WordPress page (or post), you can mouse over the page link in the page editor. From the Dashboard, select Pages > Edit. When your list of pages loads, mouse over the page title link and the page number will appear in the bottom left of the browser window.

Page link preview in WordPress edit pagesOf course, if you’re not using SEO-friendly permalinks, you can just navigate to the offending page on your WordPress site, but you really should be using SEO-friendly links! That’s another post for another time.

Related Posts with Thumbnails

Comments

  1. hey dude
    Great stuff! i got a lot of inspiration from this post
    i went through this page four times
    it is very interesting ….
    am learning for social work

    Thanks

  2. SEO Miami says:

    I appreciate your work. It is very practical to have knowledge and building own website. I like it and try to apply it.

  3. Jim says:

    Thanks. Very helpful. One follow-up… How do you get rid of “Home” as the on the home page?

Speak Your Mind

*

More in ask P3, tips and tricks, web development (5 of 18 articles)