I registered a new post type called "events". The posts of this type do show up in the loop but i can't access the single-events.php when i click on a "event" post. Also I can't access the categories of this post type.
The only advice you read on the internet - to flush the rewrite rules - didn't work me.
Any other suggestions?
Here is my registration code for this post type:
add_action ('init', 'register_events_posttype');
function register_events_posttype(){
$labels = array();
$args = array(
'label' => 'Events',
'labels' => $labels,
'show_in_menu' => true,
'show_ui' => true,
'show_in_nav_menus' => true,
'show_in_rest' => true,
'menu_position' => 2,
'menu_icon' => 'dashicons-calendar-alt',
'supports' => array('title','editor','thumbnail', 'excerpt', 'custom-fields', 'comments','revisions', 'archives',),
'taxonomies' => array('category', 'post_tag'),
'rewrite' => array('slug' => 'events','with_front' => false)
);
register_post_type('event', $args);
}