Enqueue Style in Functions.php

Your problem is that you have wrapped your complete function and your action inside your conditional check. Your conditional check for your page template should be in your function.

Page templates gets set quite late, too late for your action.

Your function should look like this

function flatsome_scripts() 
{

    if( is_page_template( 'template-flat.php' ) ) {
        wp_enqueue_style( 'flatsome-style', get_template_directory_uri() .'/flatash/css/foundation.css', array(), '2.1', 'all');
    }

}

add_action( 'wp_enqueue_scripts', 'flatsome_scripts' );

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)