php include outside header file
-
Having a bit of trouble with this…
So in my theme I want to integrate this site into an existing site. therefore using the main site’s header on my blog page . here is the structure
website.com/blog/ <– the wp install
website.com/header2.php <– the location of the header file i want to use , its 1 directory up from the blogI’ve tried adding this <?php include(‘../header2.php’);?>
into website.com\blog\wp-content\themes\MyCustomTheme\header.phpIt DOES indeed include the file but ALL the images in that header2.php file do not work. Its trying to pull the images from:
https://www.website.com/blog/images/myimage.gif
it SHOULD be pulling it fromhttps://www.website.com/images/myimage.gif
I tried searching and couldn’t find a solution and I dont want to resort to iframing it if I dont have to.
- The topic ‘php include outside header file’ is closed to new replies.