jeudi 5 février 2015

Enqueue Style in Functions.php


This doesn't work for me in functions.php:



if( is_page_template( 'template-flat.php' ) ) {

wp_enqueue_style( 'flatsome-style', get_template_directory_uri() .'/flatash/css/foundation.css', array(), '2.1', 'all');

}


However, if I include the style manually in the header of template-flat.php like this it works.



<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/flatash/css/foundation.css" type="text/css" />


Why is my functions code not working?





Aucun commentaire:

Enregistrer un commentaire