Integrating Wordpress Header with Php Page

Hey guys, I have been trying to get my wordpress header to appear above my SMF forum. The issue is when I include the ‘wp-blog-header.php’ file so that I can call get_header() to display it, the page is white. The require_once() call to the wp-blog-header.php file is making the whole page go blank, but there is no error at all and it finds the file, but the page just goes blank and I don’t know why. I have not edited the wp-blog-header.php file, it is totally default and unchanged. Any help would greatly be appreciated. Thanks in advance!

Any help at all would be appreciated. All I am doing in a nutshell is just putting my Wordpress header on my SMF Forum

I don’t have a specific suggestion, but I did google “using wordpress header outside of wordpress” and found this: It looks like it might help you. If it doesn’t you might repeat my google, there was a lot out there on the topic.

Thanks LakeRat, but I’ve exhausted hundreds of results on Google before I came here. It just is not working like they say it does. The link you provided instructed me to include the php file I was talking about in my original post: “require(’…/wp-blog-header.php’)”

This line of code runs fine for me as it finds the file it needs to, but the issue is that the php file will not execute the rest of its content after I call this line

I thought it looked similar to what you were doing, but there is no call get get_header() in the example, as there was in yours.

Another question that pops into my head as I looked at the example is if your theme has a conflict? I’m actually not complete sure what setting WP_USE_THEMES to false actually does but when I noticed define(‘WP_USE_THEMES’, false); it did occur to me that a malformed theme may have a header that depending on code that’s not getting executed in this case.

My theme is fine because I made a template page using these techniques and it worked out fine. And yes, get_header() exists, it is a standard wordpress function that comes in every install. get_header() is the reason why I am importing wp-blog-header.php. The issue isn’t with get_header(), it’s with the require() statement not progressing to the rest of the page contents.

I am genuinely curious (not trying to be smarmy at all) : why not use bbpress if you need a forum integrated with a WP site? I am not familier with SMF… does it offer some unique tools you are after?

I like smf better, it looks nicer and is just more comfortable for me. I don’t like bbpress I’ve tried it before, and that doesn’t mean it’s a bad forum it’s just that my personal preference is negative in regards to it.

You might be better off just grabbing the HTML from the header and adding what you want to your SMF forum header.
What are you trying to get anyway? Do you want all of the WordPress functions, or just the appearence?

I could, but that is highly inefficient and I am probably guessing that WordPress is putting together the header dynamically not statically so there is no html to grab, but rather it is assembled when you connect which is why it is better and probably the most efficient thing to use the get_header() function. If anybody has a solution to this I would greatly appreciate it, it’s been a few days now and it has really been bugging me. Thank you in advance.

Looks like someone else tried it this way:

Personally I just skin my non-WP sites to look WP.