I'm having difficult to load the path correctly in an 'enqueue' function.
What I am trying to achieve is to load a specific CSS stylesheet on a specific page...
The below works by adding the path to the markup on the correct template - but - the path is wrong...
add_action('wp_enqueue_scripts','homepage');
function homepage(){
if ( is_page_template('page-home.php') ) {
wp_enqueue_style('home-css', array(), '1.0.0', true );
get_template_directory_uri() . '/css/flags.min.css',
}
}
The reason is because (I believe) the path is not set correctly to find the appropriate css folder...
The php is therefore missing this line:
get_template_directory_uri() . '/css/flags.min.css',
My question is - how do I add this line that locates the theme css folder? I tried the below but it did NOT work...
add_action('wp_enqueue_scripts','homepage');
function homepage(){
if ( is_page_template('page-home.php') ) {
wp_enqueue_style('home-css', array(), '1.0.0', true );
get_template_directory_uri() . '/css/flags.min.css',
}
}