Video Tutorial The custom post type
As with taxonomies, it is possible to record new types of content which can then be administered and consulted.
function montheme_types () {
register_post_type ('good', (
'label' => 'Good',
'public' => true,
'menu_position' => 3,
'menu_icon' => 'dashicons-building',
'supports' => ('title', 'editor', 'thumbnail'),
'show_in_rest' => true,
'has_archive' => true,
));
}
add_action ('init', 'montheme_types');
Once this type of content has been declared, you can manage it from the backoffice. However, if you try to view your content, you may get a 404 error. You will need to update your site's permalinks so that the URLs corresponding to your new content are managed.