简体   繁体   中英

Hide the comments panel in WP custom post types

Is there a way I can hide the comments panel in my custom post type and still allow people to comment? Because I noticed that for the Post post type the comment panel is hidden and yet users can post comments to it.

When creating a custom post type in wordpress, I always add

'supports' => array('title', 'editor', 'excerpt', 'comments'),

which enables comments the post type, however, there always seems to be a comment panel at the bottom of the editor.

In the left top corner below the admin bar there is a screen options button.
On it are checkboxes which hide and shows part of the UI.

You can hide your comment pannel on the add/edit pages.
These settings are saved per user. So if you turn it off, an other user will still have it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM