I can't get a simple CSS change on my wordpress theme
I have SASS processed by gulp.js with browser-sync into a style.css file in the root of my theme folder.
h1 {
font-size: 3em;
color: green;
}
h2 {
font-size: 2.6em;
color: blue;
}
on my wordpress theme, I have H1 and H2 tags populated on the page
WP-content folder structure looks like this on PHPstorm
I have the theme selected under the wordpress admin, am I simply not referencing my style.css file in my theme somehow? Or perhaps need to specify this in index.php / index.html?
EDIT
it works fine now, I had enqueue styles correct the first time not sure why it didn't work earlier
I believe you need to include your stylesheet in the header.php file.
您可以将其放置在编辑器的style.css文件中,方法是将其放在相同的主题CSS区域中,例如,位置为E:\\ XAMPP \\ htdocs \\ project-example \\ wp-content \\ themes \\ twentysixteen \\ css
You don't need to add the stylesheet in head, the default style.css should be enqueued in the functions.php using the function below.
wp_enqueue_style( 'text-domain-style', get_stylesheet_uri() );
if this is done. Simply clear your cache or use private browsing or make sure no style is overriding your style updates below.(css hierarchy)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.