Title: Theme css
Last modified: August 19, 2016

---

# Theme css

 *  [paul_fury](https://wordpress.org/support/users/paul_fury/)
 * (@paul_fury)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/theme-css/)
 * Hello, I have a folder called ‘css’ inside my custom theme folder. The normal
   way to link to a css file from the head tag in the header.php file doesn’t work.
   What is the syntax I am supposed to use?
 * By normal way to link to the css file I mean:
 * `<link rel="stylesheet" type="text/css" href="css/global.css" />`
 * Also, does WP have a special way to get the first segment of the url and use 
   it in a conditional?
 * Example:
    <?php if(strcmp($url_segment_1, “about”) == 0) { ?> <link rel=”stylesheet”
   type=”text/css” href=”css/about.css” /> <?php } elseif(…) { … ?>

Viewing 1 replies (of 1 total)

 *  Thread Starter [paul_fury](https://wordpress.org/support/users/paul_fury/)
 * (@paul_fury)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/theme-css/#post-1113811)
 * ok, so i found how to get the links working properly, i have to do it this way:
 * `<link rel="stylesheet" type="text/css" href="<?php bloginfo('stylesheet_directory');?
   >/css/global.css" />`
 * But I still would like to know if WP has a special way to get the url segments
   for use in conditionals.

Viewing 1 replies (of 1 total)

The topic ‘Theme css’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [paul_fury](https://wordpress.org/support/users/paul_fury/)
 * Last activity: [16 years, 11 months ago](https://wordpress.org/support/topic/theme-css/#post-1113811)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
