Aug
10
I’ve been asked about this a few times lately, I know there’s a plugin that does this, but this is the most simple way, by far.
- Duplicate the page.php file of your theme and name it home.php
- Right before the line that starts with “< ?php if (have_posts())…”, add this line: “< ?php query_posts('pagename=home'); ?>“
- Create a page in the wordpress admin, and make sure that it’s post-slug is “home“
Done. Now the page called “home” will show as your homepage.
September 11th, 2006 at 11:11 am
[...] Via: Attackr [...]
September 20th, 2006 at 1:19 pm
Thanks for the tip LobsterMan. I’ve used the plugin you refer to on several site, but the method you describe is much simpler.
February 9th, 2007 at 8:50 am
Does this work in WordPress 2.1? I tried it and I couldn’t get it to work.
February 9th, 2007 at 1:19 pm
@SLICKROPR1: In WordPress 2.1 this will not work because they added in the functionality to do static pages. It’s in your dashboard area.