wordpress: change your home page to a custom page

so chaunce asked if i could do a small tutorial for a wordpress (wp) question he had… i’m honored that he asked me to do so… actually, i think i might start to write a bunch of tutorials that i’ve learned along the way…

and here… we… go…

this tutorial deals with the user wanting a site with a blog and pages, but the user wants a specific page to be the front page, not the blog (something similar to andy’s site, but not — since he doesn’t want his site to be full-on wordpress)

*note, i suck at technical writing, but i’ll try to fake it… i’m open to suggestions/comments for future tutorials

there’s a few things you’ll need to do before logging into the wp account:

i’m assuming that you’ll want this front page (and other pages) to have the same look and feel as your blog pages…

so open up explorer and make a copy of index.php — rename the copy whatever you want (i renamed it to “page2.php”)

copy index.php and rename copy to page2.php
copy index.php and rename copy to page2.php

next, let’s edit page2.php…

add the following text to the top of the code:

Template Name: page2
open page2.php and add text to top of code
open page2.php and add text to top of code

i put “page2” but i’m pretty sure you can put whatever you want here — i’ll show ya where this displays in a few steps…

ok go ahead and upload page2.php to your server — should i assume that you know where to put it? (i guess i should’ve done a “getting started” tutorial first…)

now log into the admin and go to Pages > Add New

choose the page title wisely, this’ll be your blog’s address

note where it shows template to the right side — this is where that “page2” came into play

name the new page and change the template to "page2"
name the new page and change the template to "page2"

click Publish

now go to Settings > Reading

change “Front page displays” to “A static page (select below)”:

* choose one of your (already created) pages for the “Front page”
* change “Posts page” to “blog”

click Save Changes

update Settings > Reading page
update Settings > Reading page

that should be it! if you go to the home page of your site, you’ll see it’s now your chosen page — and then if you append “/blog” to your domain, it’ll take you to the actual posts…

new home page
new home page
...and /blog page has all the blog posts
...and /blog page has all the blog posts

boom… you’re pregnant.

4 Responses to “wordpress: change your home page to a custom page”

  1. andy says:

    thanks for the shoutout. you were all over my head, but im not a programmer. sweet idea for the tutorials.

  2. Pretty simple tutorial you put together. It sounds fairly easy and even the non-developer types could do this fairly easily.

    A couple of suggestions:
    1. When you create a post show the first paragraph or two so that the user drills down into your site if they land on your home page (increasing your page views). You can do this with the string of code.
    2. I would also add a link on your side bar for “WordPress Tutorials”
    3. I would consider re-arranging the process of your tutorial to, switching the home page first then adding the blog to the custom created page, this way your home page isn’t disconnected in the precess in case it takes a user a few hours to do this.

    Great tutorial, hope to see more!

  3. joey says:

    thanks chaunce!
    1 – i’ve never used that string of code (it doesn’t show up in the comment but i saw it [lessthan]!–more–[greaterthan]
    2 – once i get more added, i’ll definitely do that
    3 – switching the home page/moving blog to custom page is actually one step. once you click the “save changes” button, both pages are moved. (maybe i’m not following you?)

  4. I guess I was distracted when I read it. I see where you were going with this now. I guess my thought was that if you created a custom page and then switched the blog to that new custom page that it would leave you site without a home page then. But after re-reading it, I see what you did.

Leave a Reply