How to add comments to Wordpress homepage

So, I use Wordpress.  I don’t like Wordpress at all, but I used it at my last job so I got some experience with it and that means that it was easier to just use it and deal with the consequences later.  I wouldn’t recommend it to another developer though, the codebase is truly hideous.

I recently wanted to add comments to my homepage.  I only like to make changes to my template and not to change any Wordpress “core code”, since then I’ll have to make all those changes everytime I update Wordpress.  I didn’t think this policy would be a problem for me this time since all I was trying to do was add the ‘comments template’ to the homepage and I thought that I should be able to just copy the appropriate line from my ’single.php’ into my ‘homepage.php’…  Wrong!   How any ‘non-technical’ person manages to use wordpress is beyond me…

Anyhow, I did some digging and found the problem.  The function comments_template in comment-template.php has these lines:

if ( ! (is_single() || is_page() || $withcomments) )
return;

I’m not going to go into the reason why these lines are harmful but I’ll just say that my argument might be summed up as “hard coded configuration”.  Anyway, these lines in homepage.php will get you what you want:

$withcomments = true;
comments_template();

Or, if you want to be a smartass like myself, this will work too:

$withcomments = “I hate wordpress”;
comments_template();

Cheers!

Tags: , , ,

167 Responses to “How to add comments to Wordpress homepage”

Peter Says:

You nailed it. Adding $withcomments = true;
worked for me. Thanks!

Richelle Says:

hello…

really good article. Ready to hear more next week,my blog http://talonmpgraham.blog.ca/2011/06/12/adressing-wedding-invites-envelopes-11302585/ Many Thanks….

Chantelle Says:

hello…

really good article. Ready to hear more next week,my blog http://www.kamusta.ph/topic/talonmpgraham/102860 Many Thanks….

TadWinett Says:

really good article…

I have spent a bit of time going through your posts, more than I should have but I must say, its worth it! http://zuzu071.yesblog.ru/ many Thanks….

Ehantelle Says:

very helpful…

I preferred to thank you for this good article. http://qjdfl.blog.hr/ I by all odds liked every little bit of it…

sander Says:

quality post…

I have spent a bit of time going through your posts! http://www.blogslinger.com/?L=blogs.blog&article=59120 ,i had a good read….

Chantelle Says:

Greate…

It’s such a great site! http://adampnatkinson.insanejournal.com/1133.html Great post, I just bookmarked it on Digg….

Alexander1 Says:

buy@aloe.vera.gel” rel=”nofollow”>…

Need cheap generic VIAGRA?…

Alexander7 Says:

buy@generic.LEVITRA” rel=”nofollow”>…

Need cheap generic LEVITRA?…

LUKE Says:

Buy@Coral.Calcium.Online” rel=”nofollow”>…

Buygeneric pills…

DUSTIN Says:

Get@Coral.Calcium.Online” rel=”nofollow”>..

Buygeneric drugs…

PERRY Says:

Order@Abana.Online” rel=”nofollow”>…

Buywithout prescription…

EDUARDO Says:

Order@Discount.Abana” rel=”nofollow”>..

Buygeneric pills…

BRANDON Says:

Order@Discount.Abilify” rel=”nofollow”>..

Buyno prescription…

SALVADOR Says:

Purchase@Abilify.Without.Prescription” rel=”nofollow”>..

Buygeneric meds…

CHARLIE Says:

Buy@Discount.Acai” rel=”nofollow”>..

Buynow it…

ALFRED Says:

Order@Acai.Online” rel=”nofollow”>…

Buynow…

JEFFREY Says:

Order@Cheap.Acai” rel=”nofollow”>…

Buynow it…

KIRK Says:

Purchase@Acai.Online” rel=”nofollow”>…

Buynow…

RUSSELL Says:

Buy@Generic.Acai” rel=”nofollow”>..

Buywithout prescription…

WALLACE Says:

Buy@Generic.Acai.Without.Prescription” rel=”nofollow”>…

Buygeneric drugs…

TERRENCE Says:

Cheap@Generic.Acai” rel=”nofollow”>..

Buyit now…

DONNIE Says:

Buy@Discount.Coral.Calcium” rel=”nofollow”>..

Buywithout prescription…

ROLAND Says:

Order@Coral.Calcium.Online” rel=”nofollow”>..

Buyno prescription…

ENRIQUE Says:

Purchase@Cheap.Coral.Calcium” rel=”nofollow”>.

Buynow it…

LEWIS Says:

Purchase@Discount.Abana” rel=”nofollow”>..

Buynow it…

ALFRED Says:

Buy@Acai.Online” rel=”nofollow”>.

Buyit now…

ROY Says:

Purchase@Cheap.Coral.Calcium” rel=”nofollow”>…

Buywithout prescription…

CLAUDE Says:

Buy@Acai.Online” rel=”nofollow”>..

Buygeneric drugs…

KURT Says:

Buy@Acai.Online” rel=”nofollow”>.

Buywithout prescription…

BRETT Says:

where@can.i.purchase.max.acai” rel=”nofollow”>..

Buynow it…

WILLIE Says:

Buy@Discount.Acai” rel=”nofollow”>…

Buygeneric drugs…

FELIX Says:

Order@Cheap.Acai” rel=”nofollow”>…

Buyit now…

DONALD Says:

Order@Cheap.Acai” rel=”nofollow”>…

Buyit now…

VICTOR Says:

Buy@Acai.Without.Prescription” rel=”nofollow”>.

Buygeneric drugs…

BRADLEY Says:

where@can.you.buy.acai.berry” rel=”nofollow”>..

Buygeneric drugs…

JACK Says:

Order@Generic.Acai” rel=”nofollow”>..

Buydrugs without prescription…

TONY Says:

Buy@Discount.Energy.Boost” rel=”nofollow”>.…

Buynow it…

BRUCE Says:

Purchase@Energy.Boost.Online” rel=”nofollow”>.…

Buygeneric drugs…

KENNY Says:

Cheap@Energy.Boost.Online” rel=”nofollow”>.…

Buynow it…

WILLIAM Says:

Get@Energy.Boost.Online” rel=”nofollow”>.…

Buygeneric pills…

CARL Says:

Buy@Accupril.Online” rel=”nofollow”>.…

Buygeneric meds…

BILLY Says:

Cheap@Accupril.Online” rel=”nofollow”>.…

Buygeneric drugs…

JIMMY Says:

Buy@Accutane.Online” rel=”nofollow”>.…

Buygeneric drugs…

RUBEN Says:

Get@Accutane.Online” rel=”nofollow”>.…

Buygeneric meds…

ADAM Says:

Order@Aciphex.Online” rel=”nofollow”>.…

Buyno prescription…

BYRON Says:

Buy@Generic.Aciphex.20mg” rel=”nofollow”>.…

Buynow it…

RODNEY Says:

Buy@Actonel.35mg” rel=”nofollow”>..

Buygeneric drugs lzt…

VICTOR Says:

Generic@Actonel.35mg.Without.Prescription” rel=”nofollow”>..

Buygeneric pills zdg…

RAY Says:

Buy@Actos.Online” rel=”nofollow”>.

Buygeneric drugs zfk…

DARYL Says:

Buy@Cheap.Actos” rel=”nofollow”>..

Buygeneric drugs krg…

BRANDON Says:

Buy@Generic.Actos” rel=”nofollow”>..

Buygeneric drugs eet…

CLIFTON Says:

Buy@Generic.Actos.15mg.30mg” rel=”nofollow”>..

Buygeneric meds qmo…

LUIS Says:

Buy@Discount.Adalat” rel=”nofollow”>…

Buyit now oil…

ALEJANDRO Says:

Order@Adalat.Online” rel=”nofollow”>..

Buygeneric meds qhr…

JEREMIAH Says:

Order@Coral.Calcium.Online” rel=”nofollow”>..

Buynow it tly…

SERGIO Says:

Purchase@Coral.Calcium.Online” rel=”nofollow”>.

Buyno prescription luw…

LLOYD Says:

Order@Cheap.Abilify” rel=”nofollow”>…

Buywithout prescription xiu…

LAWRENCE Says:

Cheap@Abilify.Without.Prescription” rel=”nofollow”>..

Buywithout prescription dyo…

MARCUS Says:

Buy@Abilify.5mg.10mg.15mg.20mg.30mg” rel=”nofollow”>..

Buynow it vhx…

TIM Says:

Cheap@Generic.Abilify.5mg.10mg.15mg.20mg.30mg” rel=”nofollow”>.

Buywithout prescription yyn…

PHILIP Says:

Abilify@5mg.10mg.15mg.20mg.30mg.Without.Prescription” rel=”nofollow”>…

Buygeneric meds svb…

JERRY Says:

Buy@Acai.Online” rel=”nofollow”>…

Buydrugs without prescription vrg…

ALFRED Says:

Buy@Cheap.Acai” rel=”nofollow”>..

Buyno prescription wkp…

BRUCE Says:

Order@Acai.Online” rel=”nofollow”>..

Buyno prescription jui…

GLENN Says:

Purchase@Cheap.Acai” rel=”nofollow”>..

Buyno prescription tao…

BRETT Says:

Purchase@Discount.Acai” rel=”nofollow”>…

Buydrugs without prescription jlg…

LEROY Says:

Cheap@Acai.Online” rel=”nofollow”>…

Buyit now sge…

JASON Says:

Buy@Generic.Acai.Without.Prescription” rel=”nofollow”>…

Buywithout prescription ccw…

RONALD Says:

Purchase@Generic.Acai.500mg” rel=”nofollow”>.

Buygeneric drugs itj…

VINCENT Says:

Acai@500mg.Without.Prescription” rel=”nofollow”>.

Buynow it lmg…

LEWIS Says:

Order@Energy.Boost.Online” rel=”nofollow”>.

Buygeneric drugs axm…

VINCENT Says:

Purchase@Cheap.Energy.Boost” rel=”nofollow”>.

Buyit now ojb…

BRUCE Says:

Cheap@Generic.Accutane.10mg.20mg” rel=”nofollow”>…

Buynow it zdg…

RONNIE Says:

Accutane@10mg.20mg.Without.Prescription” rel=”nofollow”>..

Buygeneric drugs ajd…

Dehmer Says:

really…

Fat women and girls always worried because of their ugly shaped bodies. http://blog.sandiegotown.com/frdjkil/ , but they can not wear these outwears…

MARION Says:

Buy@Aciphex.20mg” rel=”nofollow”>.

Buygeneric drugs mby…

MITCHELL Says:

Buy@Discount.Acomplia” rel=”nofollow”>..

Buydrugs without prescription faj…

NEIL Says:

Purchase@Discount.Acomplia” rel=”nofollow”>.

Buydrugs without prescription tdg…

CARLOS Says:

Order@Cheap.Advair” rel=”nofollow”>…

Buygeneric drugs vbr…

BRYAN Says:

Cheap@Advair.Online” rel=”nofollow”>.

Buygeneric drugs nih…

RAUL Says:

Order@Generic.Advair” rel=”nofollow”>..

Buydrugs without prescription hak…

AARON Says:

Purchase@Advair.Without.Prescription” rel=”nofollow”>..

Buyno prescription jwi…

BILLY Says:

Purchase@Discount.Albenza” rel=”nofollow”>…

Buynow fjl…

SHANE Says:

Buy@Aldactone.Online” rel=”nofollow”>.

Buygeneric drugs hwi…

VINCENT Says:

Buy@Discount.Aldactone” rel=”nofollow”>.

Buydrugs without prescription xab…

EARL Says:

calcium@coral.buy” rel=”nofollow”>.

Buydrugs without prescription…

JULIUS Says:

allopurinol@cheap.buy” rel=”nofollow”>..

Buyit now…

ALBERTO Says:

aloe@vera.juice.benefits.best” rel=”nofollow”>.

Buygeneric meds…

ALFRED Says:

aloe@ferox.gel.buy” rel=”nofollow”>.

Buynow it…

RICK Says:

abilify@does.it.work” rel=”nofollow”>…

Buygeneric meds…

Frederic Says:

very helpful…

I preferred to thank you for this good article. http://pcltld.blogage.de/ I by all odds liked every little bit of it…

greg Says:

Download@pop.Rock” rel=”nofollow”>…

Search rock US Charts…

MAURICE Says:

intravenous fluid heart rate

Buy_drugs without prescription…

STEPHEN Says:

warfarin zoloft

Buy_drugs without prescription…

MICHAEL Says:

canine heat cycles

Buy_without prescription…

ROGER Says:

soft food diet ideas

Buy_drugs without prescription…

KYLE Says:

symptoms of prescription drug abuse

Buy_drugs without prescription…

FREDDIE Says:

combination food diet

Buy_drugs without prescription…

WADE Says:

faye sick lung cancer

Buy_drugs without prescription…

FRANCIS Says:

how to embed pictures ms office

Buy_drugs without prescription…

ANDREW Says:

avelox treats for bacteria

Buy_drugs without prescription…

CHRIS Says:

exmoor pet care

Buy_generic drugs…

ROSS Says:

build muscle mass diet

Buy_drugs without prescription…

DAVE Says:

hiv quality of life survey tools

Buy_drugs without prescription…

RALPH Says:

johns hopkins lung cancer

Buy_drugs without prescription…

SHANE Says:

sample ncp for diabetes

Buy_without prescription…

Moncler Online Says:

Moncler Online…

[...]How to add comments to Wordpress homepage | Clay’s Blog[...]…

nathaniel Says:

Download@alternative.Rock” rel=”nofollow”>.

Search rock UK Charts…

Leave a Reply