Title: Copy default WordPress comments code
Last modified: August 19, 2016

---

# Copy default WordPress comments code

 *  [mrtsherman](https://wordpress.org/support/users/mrtsherman/)
 * (@mrtsherman)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/copy-default-wordpress-comments-code/)
 * I am developing a custom theme. I do not currently have a comments.php file, 
   but WordPress appears to be using some sort of default for comments. I really
   like this one, but want to tweak a few things about it.
 * How can I create my own comments.php which is basically a copy of the WordPress
   one?

Viewing 15 replies - 1 through 15 (of 27 total)

1 [2](https://wordpress.org/support/topic/copy-default-wordpress-comments-code/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/copy-default-wordpress-comments-code/page/2/?output_format=md)

 *  [Chip Bennett](https://wordpress.org/support/users/chipbennett/)
 * (@chipbennett)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/copy-default-wordpress-comments-code/#post-1982820)
 * Start with “comments.php” from TwentyTen.
 *  Thread Starter [mrtsherman](https://wordpress.org/support/users/mrtsherman/)
 * (@mrtsherman)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/copy-default-wordpress-comments-code/#post-1982828)
 * Thanks Chip. I took a look into that one, but it does not function like the default
   one at all. I have also already styled the comment form and I am loathe to redo
   all that work with a replacement comments.php. I feel as though I should just
   be able to copy and paste the commenting code from the default section into the
   custom section. But I don’t know where the code is coming from!
 *  [Chip Bennett](https://wordpress.org/support/users/chipbennett/)
 * (@chipbennett)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/copy-default-wordpress-comments-code/#post-1982831)
 * > Thanks Chip. I took a look into that one, but it does not function like the
   > default one at all.
 * What do you mean? The TwentyTen Theme _is the default_ Theme.
 * > I have also already styled the comment form and I am loathe to redo all that
   > work with a replacement comments.php.
 * You are, of course, welcome not to do so. But in so doing, your Theme will become
   less and less future-proof, and you will be missing out on a _lot_ of comment-
   form related functionality.
 * > I feel as though I should just be able to copy and paste the commenting code
   > from the default section into the custom section. But I don’t know where the
   > code is coming from!
 * Your template files call the commenting system via the `comments_template()` 
   template tag.
 * This template tag _requires_ a template file called “comments.php”.
 * All of your custom comment code needs to be in the “comments.php” file, whether
   you choose to implement the core features/markup, or roll your own.
 *  Thread Starter [mrtsherman](https://wordpress.org/support/users/mrtsherman/)
 * (@mrtsherman)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/copy-default-wordpress-comments-code/#post-1982835)
 * Thanks for the help. I realize my question didn’t make a ton of sense because
   I am pretty new to WordPress and very new to custom theming. No choice though.
 * Your words made me remember that I added comments to my custom theme by inserting`
   comments_template( '', true );` into my single.php file. So I guess what I really
   need to do is modify whatever functions comments_template calls to get the styling
   differences I want.
 *  [Chip Bennett](https://wordpress.org/support/users/chipbennett/)
 * (@chipbennett)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/copy-default-wordpress-comments-code/#post-1982837)
 * > So I guess what I really need to do is modify whatever functions comments_template
   > calls to get the styling differences I want.
 * Not exactly.
 * What you need to do is provide a “comments.php” file, which is called – and _required_–
   by the `comments_template()` template tag.
 * Commenting functionality in WordPress really simply _will not work correctly_
   unless you provide these two elements together: the `comments_template()` template
   tag, and the “comments.php” template file.
 *  Thread Starter [mrtsherman](https://wordpress.org/support/users/mrtsherman/)
 * (@mrtsherman)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/copy-default-wordpress-comments-code/#post-1982838)
 * >  Commenting functionality in WordPress really simply will not work correctly
   > unless you provide these two elements together: the comments_template() template
   > tag, and the “comments.php” template file.
 * Interesting. Oddly, with no comments.php my comments look and work great. Once
   I specify a comments.php with nothing in it all my comments disappear. I don’t
   understand why it works without it.
 * So I guess the answer is that if I want to customize comments then I _must_ have
   a comments.php file and I must code it up myself. No piggybacking on whatever
   I am currently using.
 *  [Chip Bennett](https://wordpress.org/support/users/chipbennett/)
 * (@chipbennett)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/copy-default-wordpress-comments-code/#post-1982839)
 * > Interesting. Oddly, with no comments.php my comments look and work great. Once
   > I specify a comments.php with nothing in it all my comments disappear. I don’t
   > understand why it works without it.
 * This is known as “legacy support”, in which certain template functions will use
   the specified template file from the default Theme if not provided by the currently
   active Theme.
 * This functionality, however, is deprecated, and will be removed soon. So I wouldn’t
   rely on it.
 *  Thread Starter [mrtsherman](https://wordpress.org/support/users/mrtsherman/)
 * (@mrtsherman)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/copy-default-wordpress-comments-code/#post-1982840)
 * AHA – a _find all_ on my wordpress directory led me to wordpress\wp-includes\
   theme-compat\comments.php which is what was being used by default in the absence
   of my own. Copied that into my theme directory and now I can make my modifications.
   Thank-you for leading me in the correct direction Chip. Nice suit gravatar with
   greenery in the background too =)
 *  [Chip Bennett](https://wordpress.org/support/users/chipbennett/)
 * (@chipbennett)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/copy-default-wordpress-comments-code/#post-1982842)
 * If you are just going to copy/paste code to use as a basis for further modification,
   I would _strongly recommend_ using the “comments.php” file from TwentyTen, rather
   than the deprecated “comments.php” in theme-compat.
 * If you need to make modifications to the comment-reply form, we can help you 
   learn how to do so in a forward-compatible manner, using the `comment_form()`
   function.
 *  Thread Starter [mrtsherman](https://wordpress.org/support/users/mrtsherman/)
 * (@mrtsherman)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/copy-default-wordpress-comments-code/#post-1982847)
 * > If you need to make modifications to the comment-reply form, we can help you
   > learn how to do so in a forward-compatible manner
 *  Where would I go to get help with this? Start a new thread, use this one?
 * I am interested in knowing why the current method I am using is a bad idea while
   the twenty ten is a good idea.
 *  [Chip Bennett](https://wordpress.org/support/users/chipbennett/)
 * (@chipbennett)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/copy-default-wordpress-comments-code/#post-1982853)
 * This thread is fine. 🙂
 * The current method you’re using uses deprecated (old) code.
 * Among other things, TwentyTen uses the `comment_form()` function, which will 
   be critical to future-proofing your Theme. Plugins will rely on the hooks provided
   by this function. Core features may rely on the hooks provided by this function.
   Any future core security enhancements will rely on the existence of this function.
 *  Thread Starter [mrtsherman](https://wordpress.org/support/users/mrtsherman/)
 * (@mrtsherman)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/copy-default-wordpress-comments-code/#post-1982855)
 * I will start mucking around with twentyten theme. Looks like I need comments.
   php as well as twentyten_comment from the functions.php file. Hopefully this 
   won’t be too rough. I will post back as I have questions. Thanks again.
 *  Thread Starter [mrtsherman](https://wordpress.org/support/users/mrtsherman/)
 * (@mrtsherman)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/copy-default-wordpress-comments-code/#post-1982915)
 * So not sure what to do. I copied over the twenty ten commenting theme, but I 
   still can’t figure out how the thing works. At this point I think I would be 
   fine starting from scratch. Are there any good examples out there that get all
   the basics up and going?
 *  [Chip Bennett](https://wordpress.org/support/users/chipbennett/)
 * (@chipbennett)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/copy-default-wordpress-comments-code/#post-1982930)
 * You don’t actually have to use the comment callback function from TwentyTen.
 * If you need something a bit more simple (I don’t perform any callbbacks on wp_list_comments()
   or comment_form(), you can take a look at what I use in the latest version of
   my Theme:
    [http://themes.svn.wordpress.org/oenology/1.1/comments.php](http://themes.svn.wordpress.org/oenology/1.1/comments.php)
 * (I’ve not done much with it lately, so I might need to touch it up in places;
   nevertheless, it might provide a good alternate example for you.)
 *  Thread Starter [mrtsherman](https://wordpress.org/support/users/mrtsherman/)
 * (@mrtsherman)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/copy-default-wordpress-comments-code/#post-1982949)
 * This template is good. Quite straightforward and easier to get through than the
   twentyten template. Say I wanted to edit the following section though:
 * > Your email address will not be published. Required fields are marked *
 * Where is this content coming from?

Viewing 15 replies - 1 through 15 (of 27 total)

1 [2](https://wordpress.org/support/topic/copy-default-wordpress-comments-code/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/copy-default-wordpress-comments-code/page/2/?output_format=md)

The topic ‘Copy default WordPress comments code’ is closed to new replies.

## Tags

 * [Comments](https://wordpress.org/support/topic-tag/comments/)

 * 27 replies
 * 3 participants
 * Last reply from: [mrtsherman](https://wordpress.org/support/users/mrtsherman/)
 * Last activity: [15 years, 2 months ago](https://wordpress.org/support/topic/copy-default-wordpress-comments-code/page/2/#post-1983165)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
