You can do it like-
function wpse_enqueue_post_template_styles() {
if ( is_category('bedrijven') ) {
wp_enqueue_style( 'post-template', get_stylesheet_directory_uri() . '/layout-interieur.css' );
}
}
add_action( 'wp_enqueue_scripts', 'wpse_enqueue_post_template_styles' );
Here bedrijven is your category slug.
As you said the above method hasn’t worked for you, so here I’m suggesting another method-
First remove the first method’s full code. Then follow this below method step by step-
Step 1:
In your theme’s functions.php
put the below code block-
function the_dramatist_register_category_styles() {
wp_register_style( 'post-template', get_stylesheet_directory_uri() . '/layout-interieur.css' );
}
add_action( 'wp_enqueue_scripts', 'the_dramatist_register_category_styles' );
By this above code block we are registering your stylesheet file at WordPress. So we can call it anytime.
Step 2:
Now go to your category-bedrijven.php
file and inside this file put the below code-
<?php wp_enqueue_style('post-template'); ?>
It’ll must work if you do it right.
Hope that helps.