Include a global header

Hi all, I have a file “globalheader.php” it contains CSS and a couple Divs and links. I need to include this file in all theme headers, I thought of adding:

<?php include('http://mysite.com/wp-content/themes/globalheader.php'); ?>

Now, I cannot have a file on a per-theme basis, because one edit would have to be made on all the themes, so that is the reason for the one global header file.

When I use the code above in the theme’s “header.php” file, It does not load anything. Why is that? What am I doing Wrong?

Also tried placng the header file in wp-content and including it with:

<?php include('../../tanfemeninaheader.php'); ?>

Thanks in Advance

  • drmike
    • DEV MAN’s Mascot

    [edit: Never mind as the poster figured it out – drmike]

    I’d still do it as a full url though.

    reedit: I know I’ve had to do it a few times as a readfile instead of an include:

    <?php @readfile('http://photos.drmikessteakdinner.com/main.php?g2_view=imageblock.External&g2_blocks=randomImage&g2_linkTarget=_blank&g2_show=title'); ?>