0

I'm using WAMP on windows 8.1.
My website is at: D:\program files\wamp\www\WEBSITE

Under website is:

/img
/css
Several PHP webpage files including my site header and footer<
/BLOG <-- (wordpress)

I'm trying to use my header and footer inside WordPress so I've had to change my header file paths of images to dynamic ones that start from the document root.

When I add $_SERVER['DOCUMENT_ROOT'] it starts from D:/... and when I try using / in WordPress as webroot it starts from /BLOG instead of /WEBSITE.

How do I get my root to be /WEBSITE?

2 Answers 2

0

get_option('url'); contains the web root directory in wordpress.

See: http://codex.wordpress.org/Template_Tags/bloginfo for more options (there are quite a few to choose from..)

or possibly use home_url().

See: http://codex.wordpress.org/Function_Reference/home_url

0

How about relative from the root?

/../img/
1
  • Thanks for the contribution, I know that works but I wanted a more dynamic approach to save later heartaches down the road! Nov 11, 2013 at 12:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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