Allow comments only for custom post type

Question

I want to allow comments only for custom post types but not for normal posts or pages. What would be the best way to do that? I can think of one way that is a bit ugly.

One would be to remove the comment section from the post/page template in my child theme and then have the option under "Discussion" active.

I could hide the comments one posts and pages through CSS, but that wouldn’t necessary prevent comments from being posted (even though they would be hidden on the frontend).

Is there a way to just remove the comment support for posts but keep it for custom post types? I also tried it like mentioned here:
Is there ANY way to remove comments function and section totally?

But it doesn’t hide the comment section underneath the post, if it’s already active. Also wouldn’t any new post have the comment section activated, if I have the option under "Discussion" active?

0
TheKidsWantDjent 2 months 0 Answers 10 views 0

Leave an answer