• Resolved CovilleR

    (@coviller)


    Hi. As many, I’m sure, I have multiple pages which act as a base for linking out and covering different types of content which different types of users would be interested in, etc. When doing something along the lines of that, I decided it would be a good idea to have a header which would be on every page of my site, and link to each of those main pages (For an example view hackthissite.org, criticalsecurity.net and rootthisbox.org). I’m doing so by keeping a file, /htdocs/window/sources/header.php, included in each page template using PHP inclusion. When I went to do that to my WordPress blag I found I had no idea how to do it. I tried all the following with the thought that the directory I was working in was where the header.php WordPress theme file was (I’m using the Blue Box theme), /htdocs/site/wp-content/themes/blue-box-01/ but that may be wrong:

    <?php include 'https://mysite/window/sources/header.php'; ?>
    <?php include '../../../../window/sources/header.php'; ?>
    <?php include '/htdocs/window/sources/header.php'; ?>
    <?php include 'htdocs/window/sources/header.php'; ?>

    I tried those just below the <body> tag and below each of the immediately following divs. If anyone has any idea what code I would put where to get this done, that’d be great.

  • The topic ‘PHP Inclusion In Theme Header’ is closed to new replies.