I'm designing a custom Theme using the underscores.me template. I've read several different "my css doesn't load" articles on this topic, but none seem to help w/ my issue.
My own styles will load via wp_get_template_directory_uri().'/style.css'
, while-- even with bootstrap.min.css
etc stored locally (e.g. ./css/bootstrap.min.css), where wp_get_template_directory_uri().'/css/bootstrap.css'
would be used in the code, and does show in view browser source-- it's still not loading as evidenced in Chrome developer tools sources (and as is visible when rendered).
If i use Chrome dev'r tools to view source, and click the <link href="whatever_file" />
, the file opens. So, it's not a matter of my paths being incorrect.
If I hard code my html as an HTML file, the styles are loaded. Hybrids of html / php also load the CSS. But, when I try to go "by the book" for theme development, it doesn't load.
If I use the 'Additional CSS' option in the customizer, and use e.g. @import url('http://site.local/wp-content/themes/theme_name/css/bootstrap.min.css');
it does in fact render the page w/ the bootstrap CSS as desired, but that doesn't seem correct to me. What might I be doing wrong here?
link href
in the source at all thenwp_enqueue_style()
is working. If fact, that’s the only thing it does. So if it’s done that and the URL is correct then the only issue can be the CSS. What makes you think it’s not applying? Are you sure the styles just aren’t being overwritten by another stylesheet?