I want to enqueue csss file below but it is not working?
-
Hello,
I like to enqueue external css file with name grid
so I have tried this syntax:function my_theme_enqueue_styles(){ wp_enqueue_style( 'grid-css', get_template_directory_uri() . '/grid.css', array(), "1.1", 'all' ); } add_action('wp_enqueue_scripts','my_theme_enqueue_styles');
it is not working so I tried this syntax:
wp_enqueue_style( 'grid', get_template_directory_uri() . '/grid.css',false,'1.1','all');
it is not working either .
this grid file is in tree: wp-content/themes/test/grid.cssmy functions.php looks lke this:
function test_scripts() { wp_enqueue_style( 'grid', get_template_directory_uri() . '/grid.css',false,'1.1','all'); wp_enqueue_style( 'test-style', get_stylesheet_uri() ); wp_enqueue_script( 'test-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20151215', true ); wp_enqueue_script( 'test-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20151215', true ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' );yt } } add_action( 'wp_enqueue_scripts', 'test_scripts' );
why it is not getting or what it can be wrong.
I think my self the syntax of codes are ok.
thanks
johan
Viewing 10 replies - 1 through 10 (of 10 total)
Viewing 10 replies - 1 through 10 (of 10 total)
- The topic ‘I want to enqueue csss file below but it is not working?’ is closed to new replies.