5 of my templates require specific Javascript. Currently the below works great to load Javascript into Page Template A.
add_action('wp_enqueue_scripts','css-flags');
function css-flags(){
if ( is_page_template('page-template-a.php') ) {
wp_enqueue_style('css-flags', get_template_directory_uri() .
'/css/flags.min.css', array(), '1.0.0', false );
}
}
I thought that I could simply do the following to add the same CSS file to Template B, C and D by just adding the template name to the 'IF' variable.
add_action('wp_enqueue_scripts','css-flags');
function css-flags(){
if ( is_page_template('page-template-a.php','page-template-b.php','page-template-b.php') ) {
wp_enqueue_style('css-flags', get_template_directory_uri() .
'/css/flags.min.css', array(), '1.0.0', false );
}
}
Thanks for all direction.