Creating a Static WordPress Front Page
This is far from a difficult thing to do. It’s actually so easy, its ridiculous. But I see so many people installing plugins and doing really complicated page template hacks to get this right, that I think a post dedicated to this is justified. Here’s the 30 second trick to getting a static front page.
Every theme will have an index.php file. The index.php file is your home page. This page will have your loop, that will most often bring in your latest posts etc.
Find this line:
<? if (have_posts()) : while (have_posts()) : the_post(); ?>
and just above it add this line:
<? query_posts('page_id=5'); ?>
Note that ’5′ can be changed to whatever page you want to be your home page.
What this does, is generate a specific query that the following loop will carry out. In this case, it will call the content from post_id=5.
Bear in mind that if you have a dynamic WP page list, you’ll probably want to exclude the page you created to be your home page from your normal page list. You can do this by adding the exclude argument to your page list call. Like so:
<? wp_list_pages('title_li=&sort_column=menu_order&exclude=5'); ?>
And presto, you have a static front page.



Thanks for the tip. I’ve never thought about doing it that way.
Another way you can have a static home page is to duplicate the index.php file and just rename it home.php.
WordPress in its series of checkoffs looks for any page in the template named home.php and if it finds one, automatically assigns it as the home page.
Nice tip Josh, thanks!
yeah, me either. i’m going to try this way tonight!
handyi fvyaxot mjfcgohq vkpgrqydm uqrydwf ahrdx ntrlizy
How do you modify that home.php then?
@Dillon – that template is used purely for your home page. so you can do whatever you need to do for your home page, on that home.php template…
Since WP 2.1 you have been able to set any WP page as a static home page from the dashboard.
Go to Settings|Reading and select ”Front page displays…A static page’. You can select any (existing) page from the drop-down box. I usually create a blank page called ‘Articles’ (‘Blog’ if you prefer) and use that for the ‘Posts page’.
Nice tip Josh, thanks!
It would be a better solution to apply that solution to home.php. If you site does not have an archives.php that the hacked index.php would make your site show only that page no matter what link you click. This is a instant thought that needs testing, however, this is how I would do it.
Yes! home.php is the best option
I usually use it on client’s site where I use WP as CMS and fill it with custom queries.
4745939 beers on the wall.
Thank you, I’ve been seeking for information about this subject matter for ages and yours is the best I’ve located so far.
Je pourrais vous en communiquer les sites pour de nouvelles d’icones sur ce theme. Joignez moi par mail;
Comment se fait-il que ne pas dire de l’attribut quel porte le plus à coeur dispose pluralité depuis sujets? Le fait essentiel des récents mois à l’idée de la communication des innovations:
The very root of your writing whilst sounding agreeable at first, did not really work perfectly with me personally after some time. Someplace within the sentences you managed to make me a believer but only for a while. I still have got a problem with your jumps in logic and one would do well to fill in those gaps. If you actually can accomplish that, I could surely be fascinated.
Votre article : cependant voilà de nouveaux sûrs propos de réflexion ; je me méfie de la véracité des indices parus juste avant dans cet ultime essai…
Bail Bonds http://www.bailbondsagourahills.com/ http://www.bailbondslancaster.org/bail-bonds/bail-bonds-norwalk/
Thanks much for your good document. I am glad I’ve taken the time to learn this.
I’m writing to let you be aware of of the superb discovery my cousin’s girl enjoyed reading your web page. She mastered a wide variety of things, most notably what it’s like to possess a great helping character to have other individuals really easily learn about some impossible topics. You undoubtedly exceeded visitors’ expectations. I appreciate you for churning out such beneficial, trustworthy, edifying and in addition unique guidance on that topic to Jane.
Bail Bond http://www.bailbondspasadena.org/ http://www.bailbondssignalhill.org/bail-bonds/bail-bonds-newport-beach/
Vos article : voilà certains satisfaisants thèmes de conflit cependant reste sceptique de la fidélité de vos propos exposés juste avant dans vos blog.
Thanks for this excellent article. One other thing is that almost all digital cameras arrive equipped with any zoom lens that permits more or less of any scene to generally be included through ‘zooming’ in and out. Most of these changes in focus length usually are reflected while in the viewfinder and on big display screen right on the back of the actual camera.
hey all, I used to be simply checking out this weblog and I actually admire the premise of the article, and don’t have anything to do, so if anyone want to to have an engrossing convo about it, please contact me on AIM, my name is heather smith
oui et aussi pas vraiment. Oui puisque on trouve de nouvelles causes qui certainement citent d’identiques cote. Non car il ne suffit pas de copier ce que l’on peut rencontrer sur des pages étrangers et le transposer tellement naturellement?
Does this valuable truly work, anybody tried it yet?
thank you thank you thank you! i can’t type more than this!!
F*ckin’ awesome things here. I am very glad to see your post. Thanks a lot and i’m looking forward to contact you. Will you kindly drop me a mail?
J’ai deja fait plusieurs venues sur votre site j’approuve que j’apprécie bien votre manière d’écrire et de mettre en valeur vos sujets. Je vous invite à vous rendre sur mon blog pour me transmettre votre impression… cordialement
À quoi bon ne pas révéler du dépendant qui fixe l’atout à estomac acquiert a plupart fermer bouquineurs? Le phénomène majeur protégé des récents mois à l’idée de la transmission des nouveautés
Salut a tous Pourquoi les opinions de ce rapide debrieffing demanderaient d’autres avis! Cette démarche parait bonne quoique je ne comprends pas les différents posts plus anciens. il faudrait apporter d’autres précisions pour etre plus rigoureux! Merci d’avance
Merci beaucoup pour la transparence des propos cités ici : on sait présentement s”interviewer quant à la sincère signification de certains des prétextes que vous citez ici:
Before everything else, getting ready is the secret of success.Thanks for listenng Denny Kossack
Great Post, Momma Loves it!
you are really a good webmaster. The website loading pace is incredible. It seems that you’re doing any unique trick. Furthermore, The contents are masterpiece. you’ve performed a fantastic job on this subject!
With havin so much content and articles do you ever run into any problems of plagorism or copyright violation? My blog has a lot of unique content I’ve either written myself or outsourced but it seems a lot of it is popping it up all over the internet without my permission. Do you know any techniques to help prevent content from being stolen? I’d genuinely appreciate it.
I impressed, I have to say. Actually hardly ever do I encounter a blog that each educative and entertaining, and let me tell you, you will have hit the nail on the head. Your idea is outstanding; the problem is something that not enough persons are talking intelligently about. I’m very happy that I stumbled across this in my seek for one thing relating to this.
It’s not that I want to copy your website, but I really like the pattern. Could you let me know which design are you using? Or was it especially designed?
Wonderful information shared…Iam very happy to read this article..thanks for giving us nice info. Fantastic walk_through.I appreciate this post.
I do accept as true with all the ideas you have introduced to your post. They’re very convincing and will certainly work. Nonetheless, the posts are too quick for starters. May you please prolong them a little from subsequent time? Thanks for the post.
Youmadea few
Took me time to go as a result of each of the comments, however i truly loved this article. That become Extremely useful in my opinion and i’m sure to each of the commenters right right here! It is usually excellent when you’ll be able to not just find out, but additionally busy! Im confident you possessed exciting offering this write-up.
Thanks for another wonderful article. Where else could anyone get that type of info in such a perfect way of writing? I’ve a presentation next week, and I am on the look for such information.
Valuable info. Lucky me I identified your web site by accident, and I’m shocked why this accident did not happened earlier! I bookmarked it.