You’ve posted a link to localhost
, which is just a fancy way of saying “the computer you’re currently using”, so it won’t work for anyone but you. Do you have an actual website or are you developing locally with something like XAMPP? What theme are you using?
No. The problem is with my theme. I can’t get the CSS behind my theme to work. Is there any way to show you the code without just copy and pasting everything?
what theme are you using ?
How are you loading your stylesheet? Is the problem that the stylesheet isn’t being loaded or is the problem that the styles within the stylesheet aren’t being applied properly?
The style sheet isn’t loading at all.
And here’s the method I used for loading it (It’s in a file called function.php)
<?php
function learningWordPress_resources(){
wp_enqueue_style(‘style’, get_stylesheet_uri());
}
add_action(‘wp_enqueue_scripts’, ‘learningWordPress_resources’);
are you using wp_enqueue_style
?
Is the file named function.php
or functions.php
? It needs to be named functions.php
, plural.
you need to add the name of your style sheet to the statement
wp_enqueue_style(‘style’, get_stylesheet_uri());
Hmmm. Okay, lemme try that. Hang on
should be something like
wp_enqueue_style(‘style’, get_stylesheet_uri(). “/mystyle.css”);
YAY! It’s working now! Thank you both 😀