ashbryant
Member
Posted 1 year ago #
Hi,
I have wordpress installed in a blog directory on a site. (www.thesite.co.uk/blog/) I need to include a navigtion file that holds the html for the "main site" in to the wordpress theme I am building, but when I try to use a standard php include, I fails to load it in.
How do I make this work? I don't really have to have two copies of the same file (one inside the WP dir & one outside in the main site) as it could lead to updating issues.
Any ideas??
Thanks
Ash
richarduk
Member
Posted 1 year ago #
Try
<php include('(bloginfo('url')/whatever.inc')?>
or
<?php require_once("./whatever.inc"); ?>
Can't guarantee either of them, haven't tested, let me know if either of them works
ashbryant
Member
Posted 1 year ago #
nope nothing, sorry.
Any other ideas??
richarduk
Member
Posted 1 year ago #
Absolute urls don't work? e.g http:www/whatever.com/whatever.inc
The other thing is that you usually have to go up directories from the theme e.g
\..\..\..\whatever.inc
RochesterSubway
Member
Posted 10 months ago #
I found a solution to this that works for me. Instead of an absolute path using http, try this...
include($_SERVER['DOCUMENT_ROOT']."/include/whatever.inc");