WordPress.org

Support

Support » Themes and Templates » what image location for root directory ?

what image location for root directory ?

  • Im trying to customize a theme , now I have a prob . In CSS i need to get image from a current theme location in the theme directoy. prob is, what should I give as the location ? I want to give this theme out so i cant give the URL of my site. then ?

    (../images/image.gif) ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The best way to go: the theme directory should have its own images subdirectory.
    E.g. if you distribute a theme called “ultimate” 🙂 – you should have a directory ultimate containing all the necessary files [index, archives, header etc.] AND a subdirectory “images” with all the images used in the theme. And you’ll have to include the images, too, in the distro zip.

    I think you didnt get it .
    Yes i
    m asking that only .i have a image folder under the directory. but I need to know how to call it in CSS. say an image my-theme/images/myimage.jpg

    now what should I give in “my-theme/css.css” so that it`ll call “my-theme/images/myimage.jpg” .

    I think you didnt get it .
    Yes im asking that only .i have a image folder under the directory. but I need to know how to call it in CSS. say an image my-theme/images/myimage.jpg

    now what should I give in “my-theme/css.css” so that it`ll call “my-theme/images/myimage.jpg” .

    The css pulls images relative to where style.css is so you would use just url(images/myimage.jpg); if the images directory is a subdirectory of where your style.css is (a pete and repeat sentence to match your double post :-).

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘what image location for root directory ?’ is closed to new replies.