Nope. Use the wp_enqueue_scripts
hook directly for enqueing all styles and scripts. There’s no need to hook into template_include
for that. template_include
is specifically for modifying templates.
//Adding and Encuing styles for Front Page
add_action( 'wp_enqueue_scripts', 'front_page_design' );
function front_page_design(){
if ( is_front_page() || is_home()) {
wp_enqueue_style( 'home_page_style', get_stylesheet_directory_uri() . '/index-style.css', array('handle_of_main_style') );
}
}
Where ‘name_of_main_style’ must be changed to match the handle of the stylesheet you want to load ‘home_page_style` after.