Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wordpress functions.php not working

Tags:

css

php

wordpress

Trying to include my style sheet via the functions.php file but the styles are failing to show...

function theme_styles () {

    wp_enqueue_style('normalize', get_template_directory_uri() . '/css/normalize.css' );
    wp_enqueue_style('grid', get_template_directory_uri() . '/css/grid.css' );
    wp_enqueue_style('style', get_template_directory_uri() . '/css/style.css' );
    wp_enqueue_style('google', '' );
    wp_enqueue_style('main', get_template_directory_uri() . '/style.css' );

}

I have style.css within the theme folder and a CSS file with a style.css file inside that too but the styles are not showing...

like image 582
st4cker Avatar asked Aug 05 '26 07:08

st4cker


1 Answers

I ran into a similar problem. After sometime I realized I forgot to add the wp_head() hook before the end of the head tag.

like image 159
Sandip Satyal Avatar answered Aug 06 '26 21:08

Sandip Satyal



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!