WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I needed to replace the #site-title text with an image and I found a great blog post explaining this:


But it appears that the image to be placed in background: url(/header.png) #fff no-repeat; must always lie in the root directory (~/public_html).

I am using a Twenty Elven child theme and I tried to place the image file in the images subdirectory of the child theme, but when I do this no image is visible. So far, the solution described in the article only works if the image is placed in the root directory.

Why is that?

Is there a way to allow the image to be placed in the images subdirectory of the child theme?

share|improve this question
up vote 1 down vote accepted

The / in header.png makes it look in the root directory.

Try just doing background: url(header.png) #fff no-repeat;

share|improve this answer
Thanks. I understand the role of the / but I tried background: url(images/header.png) #fff no-repeat; and various levels of url(../../images/header.png) #fff no-repeat; and that didn't work. Any idea why? – ef2011 Feb 8 '12 at 23:00
What are the actual paths for the theme stylesheet and the image itself? I'm assuming /public_html/wp-content/themes/theme-name has the stylesheet and /public_html/wp-content/themes/theme-name/images has header.png? – Kyle Feb 8 '12 at 23:03
OK I tried your suggestion as well and it didn't work. Actual path for the theme stylesheet: /public_html/wordpress/wp-content/themes/child0/style.css. Actual path for the image: /public_html/wordpress/header.png. Your help is much appreciated. +1 for now. – ef2011 Feb 8 '12 at 23:41
@ef2011 What if it's just url(/wordpress/header.png)? Actually, your goal is to have it in /public_html/wordpress/wp-content/themes/child0/images right? – Kyle Feb 8 '12 at 23:45
OK, I just moved the image to the same directory as the style.css and your suggestion works: /public_html/wordpress/wp-content/themes/child0/header.png. The question now is whether placing it in the images subdirectory of the the child theme can work. – ef2011 Feb 8 '12 at 23:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.