Reputation: 16163
I am using wordpress and am trying to link to the stylesheet:
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
It is not recognizing that link tag, because I think the bloginfo('stylesheet_url') part is not working correctly.
Where can I set the location of the stylesheet url in wordpress?
Upvotes: 0
Views: 4811
Reputation: 41
Another solution for those who want their stylesheet inside a subdirectory such as /css is to use bloginfo('template_url')
instead of bloginfo('stylesheet_url')
Append the directory and stylesheet name inside the link href and outside the PHP tags
e.g.:
<link rel="stylesheet"
href="<?php bloginfo('template_url'); ?>/css/style.css"
media="screen" />
If (OOPS=='where did my background images go') {
add relative path to image references in style sheet i.e. url(images/mybackground.jpg)
becomes url(../images/mybackground.jpg)
}
Upvotes: 0
Reputation: 382726
This is what should be specified:
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" />
You are specifying correctly, make sure that you have put the CSS file in the root of your theme folder and the CSS file is named style.css
Upvotes: 2