matt 0

How can I add an image to my wordpress theme? I found one guide on wordpress' site, but when I tried to do it the theme returns errors in the header

  • Here's the link I'm using: matt almost 10 years ago

2 answers

o.k.w 2355

If you want to get your hands dirty by meddling with the template php files, you'll need to be careful. Sometimes you can use creative ways to have images displayed without resorting to that. E.g. using plugins, using background images in CSS etc.

Care to share your wordpress site Url? By the way, is this the WP guide you were refering to: ?

Answered almost 10 years ago by o.k.w
danwellman 5600

Are you adding the images you'd like to use to the theme directory? If so this will be why the header can't see the images

Wordpress serves pages from the wordpress root but it serves stylesheets and CSS background images from the theme folder. Any elements added to the page will need the correct path from the root to the theme directory (if that's where you store the images). I have found it useful to use absolute URLs instead of relative ones

Answered almost 10 years ago by danwellman