Forums
Home / Fixing WordPress / Can't Enable Comments On Custom Post Types
(@frychiko)
13 years, 9 months ago
How can I enable comments on custom post types?
I’m on a fresh install of WP 3.0 with no plugins installed. This is the code I have for a custom post type:
register_post_type("product", array( "label" => __("Products"), "singular_label" => __("Product"), "public" => true, "capability_type" => "post", "hierarchical" => false, "rewrite" => array("slug" => "Shop"), "query_var" => false, "show_ui" => true, "supports" => array("title", "editor", "thumbnail", "author", "custom-fields", "comments") ));
And I’m using the default comment template provided by wordpress, without any custom callback:
<?php comments_template(); ?>
I have also checked ‘allow comments’ under ‘Discussion’ for this post type.
Looks like they are enabled now.. weird.
(@fcarthy)
13 years, 6 months ago
I’m having the same issue… what did you change?
(@rogercoathup)
13 years, 4 months ago
Did you get an answer to this problem?
We have one site where comments on custom posts are disabled, and another where they work fine. Same code, same settings.
(@frychiko)
13 years, 9 months ago
How can I enable comments on custom post types?
I’m on a fresh install of WP 3.0 with no plugins installed.
This is the code I have for a custom post type:
And I’m using the default comment template provided by wordpress, without any custom callback:
<?php comments_template(); ?>
I have also checked ‘allow comments’ under ‘Discussion’ for this post type.