Support » Themes and Templates » trying to include header on non wp page

  • err trying to call my wordpress header onto a separate web page that does not run on wp but cannot seem to get it to work.

    <?php include(""); ?>

    but the result

    Warning: include() [function.include]: URL file-access is disabled in the server configuration in /home/.guy/mydomain/jobs/index.php on line 1
    Warning: include(http://mydomain/blog/wp-content/themes/my_theme/header.php) [function.include]: failed to open stream: no suitable wrapper could be found in /home/.guy/mydomain/jobs/index.php on line 1
    Warning: include() [function.include]: Failed opening 'http://mydomain/blog/wp-content/themes/my_theme/header.php' for inclusion (include_path='.:/usr/local/php5/lib/php:/usr/local/lib/php') in /home/.guy/mydomain/jobs/index.php on line 1
Viewing 6 replies - 1 through 6 (of 6 total)
  • whooami



    fopen is disabled (for at the very least urls)

    thats a server issue, not a wordpress issue.

    see if you can do the include using the path to the file and not the absolute url.

    if you cant then you probably need to to use curl. In that case google for how to use curl.

    here, I did the googling for you.

    my dear,
    i think its not best way to call your header like that if you want use include use directly the directory and sub….

    should be work as well..
    but i dont now.. i tried befor include header & foter but between them always the test shows in the down of page!!

    i think i ask about same idea in the related link:





    oh and look at that, youre even hosted on dreamhost — there you go.

    yeah fopen is off – i can setup my on php.ini file to fix this.
    I will also try using the correct path code.. and post back.

    just trying to make my job board similar to my blog 🙂

    dreamhost rocks !

    ok turned on fopen and url_include and the only error left is

    Fatal error: Call to undefined function wp_head() in /home/.guy/mydomain/blog/wp-content/themes/my_theme/header.php on line 24

    anyway to fix this?

    the php page i am calling the header is in /mydomain/jobs

    my wp is located in /mydomain/blog

    okay after fumbling around with all the code i figured out i can acomplish adding my blog header to my job board by turning the header.php into html
    while using the php include function

    but i rather not do this, what do i need to require so that the wordpress functions/code will work outside the wp folder?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘trying to include header on non wp page’ is closed to new replies.