How to add a comment box to specific pages in wordpress

39
89
9.2K followers

Sometimes some of us need to add a comment box to specific pages in wordpress, but due to restrictions of some wordpress templates we can't do it. Even if your template is a premium, i.e. paid one, you still can't add that box to all of your pages. Adding a comment box is not as difficult as you might be thinking at all. What you need is just open your Wordpress dashboard and head over to Appearance - Editor.


Now, on the right side of your screen, scroll down to find page.php file and click on it

Once you inside that file, just ctrl+F and find this line

Once you've found that line, just add the code on the image below

Finally, click on update file

Remember that if you update your wordpress template in the future, then you'll need to add that code to page.php file again.

P.S. Before making changes to page.php file copy the whole code inside page.php and paste it to a separate editor file (for example, notepad) so you can restore your page.php if something goes wrong.

39
89

Join FREE & Launch Your Business!

Exclusive Bonus - Offer Ends at Midnight Today

00

Hours

:

00

Minutes

:

00

Seconds

2,000 AI Credits Worth $10 USD

Build a Logo + Website That Attracts Customers

400 Credits

Discover Hot Niches with AI Market Research

100 Credits

Create SEO Content That Ranks & Converts

800 Credits

Find Affiliate Offers Up to $500/Sale

10 Credits

Access a Community of 2.9M+ Members

By continuing, you agree to our Terms of Service and Privacy Policy
No credit card required

Recent Comments

89

Thanks. It sure is easier when you have the plug in.

1

great info..

1

Great info ... thanks. M

1

Thanks rufat, good info.........Frank

1

Thank you for this information!

1

Good job, Rufat!

1

Thanks for this Rufat. Very helpful.

1

thanks, I've been having problems with my comment box, there is a link at the bottom of the page that says no comment, I click it and it opens but next time I go to the page it is closed again! I will try this out maybe

You can also try to do the following: there is a "quick edit" option next to every page in the dashboard. Click on that option to make sure that "allow comments" box is checked.

1

Thank you!

1

Thanks for sharing. Good stuff!

1

Glad you found it helpful. Thank you.

1

See more comments

Join FREE & Launch Your Business!

Exclusive Bonus - Offer Ends at Midnight Today

00

Hours

:

00

Minutes

:

00

Seconds

2,000 AI Credits Worth $10 USD

Build a Logo + Website That Attracts Customers

400 Credits

Discover Hot Niches with AI Market Research

100 Credits

Create SEO Content That Ranks & Converts

800 Credits

Find Affiliate Offers Up to $500/Sale

10 Credits

Access a Community of 2.9M+ Members

By continuing, you agree to our Terms of Service and Privacy Policy
No credit card required

2.9M+

Members

190+

Countries Served

20+

Years Online

50K+

Success Stories

The world's most successful affiliate marketing training platform. Join 2.9M+ entrepreneurs building their online business with expert training, tools, and support.

© 2005-2025 Wealthy Affiliate
All rights reserved worldwide.

🔒 Trusted by Millions Worldwide

Since 2005, Wealthy Affiliate has been the go-to platform for entrepreneurs looking to build successful online businesses. With industry-leading security, 99.9% uptime, and a proven track record of success, you're in safe hands.