• I am very new to WordPress, but not a newbie with the basics of html, css and php.

    I looked for hours for an answer to my question, but could not find anything. Please excuse me if this is a redundant post.

    I am designing a WordPress theme to match one of my current sites. I have placed the WordPress folder within that site. However, I would like to be able to access css files, php includes and images from outside of the WordPress folder. For some reason, it doesn’t work. I have tried both absolute and relative links, but no luck. However, when I copy and paste the php includes and css into my theme’s folder, it works fine.

    I suppose I can live with that, even though it’s not ideal. However, the images are a bigger problem. Initially, I tried to access images outside of the wordpress folder, but just like the includes and css, it did not work. So, I moved my images into a new folder inside my wordpress theme folder, but the images still do not load in the browser.

    Can you help me about with this? I would greatly appreciate it.

    Thanks

Viewing 1 replies (of 1 total)
  • I have my images outside my WordPress folder and they work fine. Try loading your images in the browser to confirm that your image URLs are correct. Bad or overly strict hotlink protection can also prevent image display. Also try checking your page with a validator to see if your code for them is correct:

    http://validator.w3.org/

    As for includes, I’d recommend keeping them in your theme folder.

    http://codex.wordpress.org/Include_Tags

    And for the css, I’d add it to your theme’s style.css or create a new stylesheet in your theme folder and link to it with bloginfo.

    http://codex.wordpress.org/Bloginfo

    Like images, stylesheets can also be directly loaded in the browser, so try your stylesheet URLs in your browser to confirm that they are correct.

Viewing 1 replies (of 1 total)
  • The topic ‘Accessing images and folders outside of wordpress root’ is closed to new replies.