I've registered two custom post types. Now I've created a template for the post but it's not being called by WP.
Registering the post types in functions.php:
function create_post_types() {
register_post_type('behandelingen', array(
'labels' => array(
'name' => 'Behandelingen',
'all_items' => 'All Posts'
),
'public' => true
));
register_post_type('medewerkers', array(
'labels' => array(
'name' => 'Medewerkers',
'all_items' => 'All Posts'
),
'public' => true
));
}
add_action('init', 'create_post_types');
The custom post sections come through in the WP backend and I've added posts to this which seems to be working fine.
Next I've added a custom post template ("post-medewerkers.php"):
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
Test
</body>
</html>
When I go to the permalink of the custom page it doesn't show "Test" but it shows the content from index.php.
Where did I go wrong? Why isn't the custom template registering?
Thanks!