# Does Roots_Walker_Comment replace comment_form() completly?

**URL:** https://discourse.roots.io/t/does-roots-walker-comment-replace-comment-form-completly/1800
**Category:** uncategorized
**Created:** 2014-06-12T22:15:33Z
**Posts:** 7

## Post 1 by @scottm — 2014-06-12T22:15:33Z

I’m developing my first WP theme for ThemeForest and I’ve hit a snag that I’m not sure how to resolve. I’ve run my theme through Theme Check and I get this one error:

![](https://discourse.roots.io/uploads/default/64/278eb9f6ffde62e9.png)

I know Roots has it’s own method of handling comments (which seems to work fine to me) but does it completely circumvent the use of comment\_form()?

My interest is in just passing this test so I’m able to submit the theme, would it make sense to remove the Roots\_Walker\_Comment class and just use Wordpress’s default comment\_form() to display comments, or am I just asking for trouble by doing that?

---

## Post 2 by @cfx — 2014-06-16T21:21:15Z

Afaik the comment walker has little to do with outputting the comment form. The comment form’s markup is in `templates/comments.php`.

The easiest way to figure out whether your proposed solution will work is to simply try it, but I suspect the result will not be what you expect.

Try replacing [line 13 in your single template](https://github.com/roots/roots/blob/master/templates/content-single.php#L13) with a call to `comment_form()`.

---

## Post 3 by @scottm — 2014-06-17T00:27:02Z

Thanks for your response cfx,

I tried your solution and I get the same result I get when I tried to just comment out the Roots\_Walker\_Comment class. The form displays, and submits comments, but does not show them on the page.

When I tried your suggestion, the form showed up, I added a test comment however it did not display on the page after submitting. When I uncommented

`comments_template('/templates/comments.php');`

to return to the Roots commenting method, I could see the previously submitted comment. I’m not quite sure how to resolve that. Honestly I’m of a mind to simply submit the theme to Theme Forest anyway as the Roots commenting system works perfectly fine. We’ll see how that goes, if they tell me I have to absolutely have that specific function, then I guess I’ll spend more time coming up with a work around.

Thanks again for your suggestion cfx I appreciate your time and thoughts.

---

## Post 4 by @Foxaii — 2014-06-17T01:03:38Z

Try moving the comments.php template to the theme root and change any path references accordingly.

---

## Post 5 by @scottm — 2014-06-17T16:57:29Z

Hi Foxaii, thanks for your suggestion.

I did as you suggested and moved the templates/comments.php to the theme root, this seemed to do the trick as long as I also replaced `comments_template('/templates/comments.php');` with `comment_form();`. However, I did get the following error afterwards:

> Notice: Theme without comments.php is deprecated since version 3.0 with no alternative available. Please include a comments.php template in your theme. in /Applications/MAMP/htdocs/phpLocalhost/wordpress-roots/wp-includes/functions.php on line 3136

This was puzzling as I clearly have comments.php in the theme root and it is displaying the comments (although they have lost all their styling), any thoughts on what’s going on there?

---

## Post 6 by @scottm — 2014-06-18T15:41:13Z

Ok, I uploaded the current theme to a live server and the Notice error I was getting is no longer there. I know this is because WP\_DEBUG is set to false on my live test server. I guess my next question is, is this an acceptable compromise to actually eliminating the Notice all together?

Ideally I’d like no, Notices at all but since all the functionality is still there and this isn’t an theme breaking error, should I just ignore it?

---

## Post 7 by @Foxaii — 2014-06-18T15:54:10Z

If the comments.php file is in the theme root you shouldn’t be getting that notice; it’s the standard location for it.

It shouldn’t matter either way but it would be good to know why the error is being wrongly thrown.
