I'm doing a website using wordpress. It's my first project using it. I'm looking for a way to create custom css for each page of my website because my pages are extremely different. I don't want to put all in the styles.css of my theme. I know I can do something like:
function initScriptsAndStyles()
{
if ( is_post( 'home' ) )
{
wp_enqueue_style( 'style', get_template_directory_uri() . '/css/home.css');
}
}
add_action( 'wp_enqueue_scripts', 'initScriptsAndStyles' );
But I don't want to do this for each post also, you will always be worried that no body changes the name or something... I found people that says it can be inserted dynamically, but i don't know the way to do that, didn't found any tutorial that explain step by step.
Anyone can help me?
Cheers!