Click Create on Comments, give the type a singular and a plural name, such as Review and Reviews, and choose a Key. The list also shows WordPress's own Comments and any comment types another plugin reports; those can't be edited here, but fieldsets can target them.
Registering a type creates no comments. Whatever submits a comment decides its type: your theme's comment form, an import, or a plugin. See Comment forms for how a theme collects a review with its fields.
The key is what WordPress stores on each comment of this type, and you can't change it later.
Up to 20 characters: lowercase letters, numbers, hyphens and underscores. WordPress keeps a comment's type in a 20-character column.
It can't start with an underscore, and comment, pingback, trackback, note and all are taken by WordPress.
Pick a key no other plugin uses. WooCommerce, for example, stores its product reviews as review; registering review on a store would give its reviews your settings.
Post types lists the post types comments of this type are left on, such as Books. It decides where the type's admin menu items appear, and themes can ask it before they accept a comment of this type. It doesn't turn comments on for a post type; that's the post type's own Comments setting.
Show in admin menu: adds a menu item under each of the post types, such as Books → Reviews. It opens the Comments screen filtered to this type on that post type, where you approve, reply to and edit them as usual. Menu name changes its label.
Avatars: shows avatars beside these comments. WordPress shows them for ordinary comments only.
Show in REST API: lets anyone who can read the comments list them by type through the WordPress REST API, at /wp/v2/comments?type=book_review. WordPress otherwise lets only users who can edit posts filter comments by type, which a headless front end can't. Each comment is still only as visible as WordPress makes it: approved comments on posts the visitor can read.
Icon, Accent color and Description label the type in the VX dashboard.
The Comment type filter on WordPress's Comments screen lists every registered type.
Delete removes the registration only. Comments of the type keep their type and their field values, and fieldsets keep their Locations, which show the type as an unknown reference until you register it again with the same key. Its admin menu items, avatars and REST listing stop.
Key rules:^[a-z0-9_-]+$, max 20, no leading _; not comment, pingback, trackback, note, all; unique; not a key vxframework/comment_types/external reports. vx-framework/create-comment-type (and its dry_run) adds a type_in_use warning when comments of the key already exist.
Admin menu item:edit-comments.php?comment_type=<key>&post_type=<post type> under each post type whose show_in_menu is true (a post type nested in another plugin's menu gets none); capability edit_posts.
REST listing: a GET /wp/v2/comments with type=<key> from a user without edit_posts runs WordPress's permission check as an ordinary comment query, then is narrowed back to the type (pagination Link headers keep type). Status and the other protected parameters keep their checks. Creating a comment of a custom type over REST stays refused by WordPress.
Other plugins' types: filter vxframework/comment_types/external returns type => label; each becomes a Comment Type location target. VX registers nothing else for them.
Delete (vx-framework/delete-comment-type) fires vxframework/comment_type/before_delete; refused when the type is code-owned. Comments and comment meta are untouched.
Creating a comment type
Click Create on Comments, give the type a singular and a plural name, such as Review and Reviews, and choose a Key. The list also shows WordPress's own Comments and any comment types another plugin reports; those can't be edited here, but fieldsets can target them.
Registering a type creates no comments. Whatever submits a comment decides its type: your theme's comment form, an import, or a plugin. See Comment forms for how a theme collects a review with its fields.
The key
The key is what WordPress stores on each comment of this type, and you can't change it later.
comment,pingback,trackback,noteandallare taken by WordPress.review; registeringreviewon a store would give its reviews your settings.Post types
Post types lists the post types comments of this type are left on, such as Books. It decides where the type's admin menu items appear, and themes can ask it before they accept a comment of this type. It doesn't turn comments on for a post type; that's the post type's own Comments setting.
Settings
/wp/v2/comments?type=book_review. WordPress otherwise lets only users who can edit posts filter comments by type, which a headless front end can't. Each comment is still only as visible as WordPress makes it: approved comments on posts the visitor can read.The Comment type filter on WordPress's Comments screen lists every registered type.
Deleting a comment type
Delete removes the registration only. Comments of the type keep their type and their field values, and fieldsets keep their Locations, which show the type as an unknown reference until you register it again with the same key. Its admin menu items, avatars and REST listing stop.
Related
Technical details for LLMs
comment_types, typecomment_type, files invx-config/comment-types/<key>.json.php(a<key>.jsonfile is read too). Blueprint:Blueprint::comment_type( 'book_review' )->name( 'Review', 'Reviews' )->post_types( [ 'book' ] ).singular_name,plural_name(max 200 each),description,icon/icon_svg,accent_color,post_types(string[]),show_in_menu(default true),menu_name(empty →plural_name),avatars(default true),show_in_rest(default true).^[a-z0-9_-]+$, max 20, no leading_; notcomment,pingback,trackback,note,all; unique; not a keyvxframework/comment_types/externalreports.vx-framework/create-comment-type(and itsdry_run) adds atype_in_usewarning when comments of the key already exist.edit-comments.php?comment_type=<key>&post_type=<post type>under each post type whoseshow_in_menuistrue(a post type nested in another plugin's menu gets none); capabilityedit_posts.GET /wp/v2/commentswithtype=<key>from a user withoutedit_postsruns WordPress's permission check as an ordinary comment query, then is narrowed back to the type (paginationLinkheaders keeptype). Status and the other protected parameters keep their checks. Creating a comment of a custom type over REST stays refused by WordPress.vxframework/comment_types/externalreturnstype => label; each becomes a Comment Type location target. VX registers nothing else for them.vx-framework/delete-comment-type) firesvxframework/comment_type/before_delete; refused when the type is code-owned. Comments and comment meta are untouched.vx-framework/list-comment-types,vx-framework/get-comment-type,vx-framework/create-comment-type,vx-framework/update-comment-type,vx-framework/delete-comment-type.