I tried posting this topic on the SMF forums yesterday but haven't gotten a response yet, so I figured I'd try posting it here.
I've done a lot of integration with wordpress and external sites and I just can't figure out how to fix this issue.
Over at segabits.com we have featured articles on the header, that's the only reason I want to integrate the header directly, otherwise I would just do it manually with HTML code.
Well, I've been tinkering with this for hours and these are the ends I'm stuck at:
I can randomly drop the code into the top or bottom of the smf index.php file for the root directory of SMF and this is what happens:
http://i.imgur.com/XBzt4.png
Which is good and bad at the same time. It's great that it's including the header! I only want it to include it once though.. but the thing is, when I try to include the header in a logical way so it only appears once it directs me to a non-existant wordpress install in the SMF directory.
Here are solutions I have tried that all lead me to the non-existant install directory:
- Including the code right after the body tag in index.template.php
- Creating a function called wpHeader(); with the code in index.php and calling it in index.template.php
- Including the code in the beginning of the smf_main(); function in the index.php file
the code in question that I'm talking about:
define('WP_USE_THEMES', false);
require_once('/path/to/blog/wp-blog-header.php');
require_once('/path/to/blog/wp-content/themes/segabits2/header.php');
The wordpress blog is installed in the /home/blog/ directory and SMF is installed in /home/smf/ directory. I was thinking maybe that could be an issue, but I wanted to see if other people thought it could be before I go crazy and move everything.
I mean seriously XD this is making me pull my hair out. XD. I'm hoping I can get an answer here, but if not I'll try the wordpress forums... *prays*
Oh, and sorry if this was the wrong forum to post this topic in. It just seemed the most appropriate.