Custom post type: can’t enable comments by default

I want to enable comments for custom post types just like they are for standard posts, but can’t seem to get it to work.

In functions.php, as part of registering my custom post type, I have this:

'supports' => array('title', 'author', 'thumbnail', 'comments', 'revisions'),

In my single post type template I have this:

<?php comments_template( '', true ); ?>

But on the edit screen “allow comments” is un-checked by default which results in a “comments are closed” message on the front end. When I check “allow comments” then comments are enabled on the front end, but I really don’t want to tell my client he has to manually check that box for every new post.

I tried the recommendations here:

Why are the comments disabled by default on my custom_post_types?

But it didn’t work for me.

I tried disabling all plugins. Didn’t work.

Using WP 3.6.

Any suggestions? Thanks in advance.

Answer

I made no additional changes, but somehow it’s working correctly now. Perhaps the system had to sleep on it or something, but when I checked again this morning everything was working properly.

I believe that these instructions do work:

Why are the comments disabled by default on my custom_post_types?

Essentially kick-starting the comments in SETTINGS > DISCUSSION, much like clicking “save changes” in SETTINGS > PERMALINKS resets the system if you run into a 404 after registering custom post types.

Attribution
Source : Link , Question Author : dadra , Answer Author : Community

Leave a Comment