Forums

[resolved] TEMPLATEPATH Question (4 posts)

  1. therealhopeful
    Member
    Posted 4 years ago #

    I "moved" the content over to the root index today, and all seems to be going well so far. However, there is one small issue I would like to resolve. In order to get the background image specified in my CSS I had to use an absolute URL, which I don't like to do because it can lead to issues with mirrored domains, etc. I noticed in header.php there is TEMPLATEPATH to handle such things, but when I tried to use it in my PHP-enabled CSS file, it didn't work. Do you know what else I might need to add to make TEMPLATEPATH functional?

  2. therealhopeful
    Member
    Posted 4 years ago #

    :D bump :D

  3. Jeremy Clark
    Moderator
    Posted 4 years ago #

    The structure of you theme shouldn't change. For example
    wp-content/
    -themes/
    --yourtheme/
    ---style.css
    ---index.php
    ---other theme files
    ----images/
    ----yourheader.jpg
    just reference the header image as relative from where the style sheet resides in this example under wp-content/themes/yourtheme/style.css. So when referencing your image use images/yourheader.jpg.

  4. therealhopeful
    Member
    Posted 4 years ago #

    Hey, it worked! Thanks, Jeremy!

Topic Closed

This topic has been closed to new replies.

About this Topic