Title: Stylesheet directory code snippet
Last modified: August 20, 2016

---

# Stylesheet directory code snippet

 *  [Stef](https://wordpress.org/support/users/stefprein/)
 * (@stefprein)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/stylesheet-directory-code-snippet/)
 * Hi!
 * Usually the link to a stylesheet is called using this line of code:
 * `<?php bloginfo( 'stylesheet_url' ); ?>`
 * This line use the URL to point to the stylesheet location. But that won’t work
   on the site I’m working on, because it has two URL’s pointing to the same site.
   
   Would it be possible to point to a directory? For example with this piece of 
   code:
 * `$current_stylesheet_dir`
 * Thanks a lot in advance!

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Digital Raindrops](https://wordpress.org/support/users/adeptris/)
 * (@adeptris)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/stylesheet-directory-code-snippet/#post-2155044)
 * Hi Stef,
    The main call for **style.css** in **header.php** and this file name
   should only exists the once, and does not need the file name: `<link rel="stylesheet"
   type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />`
 * Not sure what you mean by two URL’s, do you mean you have two files?
 * If you do the second file should not start with `style` and you can call it like
   this, UNTESTED code:
 * If you had a second stylesheet in a subfolder **/styles/** in a **parent theme**:
   `
   <link rel="stylesheet" type="text/css" href="<?php echo get_template_directory_uri().'/
   styles/custom.css"'; ?> media="all" />`
 * If you use a child theme and had a second stylesheet in a subfolder **/styles/**
   in a **child theme**:
    `<link rel="stylesheet" type="text/css" href="<?php echo
   get_stylesheet_directory_uri() .'/styles/custom.css"'; ?> media="all" />`
 * HTH
 * David
 *  Thread Starter [Stef](https://wordpress.org/support/users/stefprein/)
 * (@stefprein)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/stylesheet-directory-code-snippet/#post-2155049)
 * The problem is that I have two urls pointing to the same site:
    – [http://www.noinknoglory.com/](http://www.noinknoglory.com/)–
   [http://www.noinknoglory.nl/](http://www.noinknoglory.nl/)
 * Firefox doesn’t want to load my custom fonts… That’s the problem 🙂

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Stylesheet directory code snippet’ is closed to new replies.

## Tags

 * [code](https://wordpress.org/support/topic-tag/code/)
 * [snippet](https://wordpress.org/support/topic-tag/snippet/)
 * [Stylesheet](https://wordpress.org/support/topic-tag/stylesheet/)
 * [stylesheet_url](https://wordpress.org/support/topic-tag/stylesheet_url/)
 * [url](https://wordpress.org/support/topic-tag/url/)

 * 2 replies
 * 2 participants
 * Last reply from: [Stef](https://wordpress.org/support/users/stefprein/)
 * Last activity: [14 years, 11 months ago](https://wordpress.org/support/topic/stylesheet-directory-code-snippet/#post-2155049)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
