How do I include a css file while creating a wordpress theme?


Tags: php,css,wordpress,header,stylesheet

Problem :

I'm trying to create a wordpress theme. After following some tutorials I've written this in my header.php

<link href="<?php bloginfo('stylesheet_url');  ?> " rel="stylesheet" type="text/css" media="screen" />

I have one CSS file, styles.css, in the same folder as the index.php. What I have id weirdly calling CSS from somewhere, but not from the style.css file. How do I make it call all its styles from the styles.css file?? Thanks : )



Solution :

Might be a good idea to check the output of the bloginfo('stylesheet_url'); function (say, by echoing it out somewhere) and see wether it actually points to your stylesheet. You can always use bloginfo('stylesheet_directory'); and add a filename to link to another file in the same dir.


    CSS Howto..

    In GWT, how can I override DisclosurePanel's CSS using or ClientBundle

    How do I change the z-index of a div when the user mouses over it?

    How to style the entire first row of a table in css

    How to add delay in css hover on a div that was displayed none?

    Jquery content slider, how to duplicate without redundant code

    How can I make the ul list the same size as the input element in terms of width?

    How to cancel left or right rules with an !important tag?

    How to re-animate CSS3 animations on class change

    How to set CSS3 ::selection using Javascript

    How to style responsive table to make table like list?

    How to remove this head css styling with javascript?

    How to make a css 'snail'?

    How to properly float two columns side by side with css

    How do I vertically centre a div of variable height within a div of variable height?

    Android How to load Custom CSS on external HTML page in WebView

    How do I show divs in an IE print preview page that are programmatically hidden via javascript?

    How to create a clickable block?

    How to create triple div border in CSS

    Formatting text, Suggestions with how-to?

    How do I convert scss to css

    How do you make a button increase in size (125%) for few milliseconds and then return it original size on click?

    CSS HTML How to make a larger image than div display in full in div

    How to add css files using PHP inside the tag?

    How to apply a CSS class on hover to dynamically generated submit buttons?

    CSS3 Box, How to stop automatic resize with content?

    How to do drop-down box like “More action” in gmail

    How to show local html file into webview?

    How To Embed font-awesome CSS into DOM Scripting (javascript)?

    how to align first li left and second li center in the ul element

    How to override group of css class?