• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Loading xenForo into external page

#1
Hello folks, I am running a Wordpress/xenForo bridge and making attempt to initialize xenForo inside my Wordpress templates. The only option I know of to integrate my xenForo into the Wordpress theme is by copying over the identical html & css into xenForo's footer & header, though I don't like the idea of this. Something I am trying right now is to load xenForo entirely on an external page, though the default code to load xenForo redirects me to my website index page:

PHP:
$startTime = microtime(true);
$fileDir = '/home/aggres12/public_html/forums';

require($fileDir . '/library/XenForo/Autoloader.php');
XenForo_Autoloader::getInstance()->setupAutoloader($fileDir . '/library');

XenForo_Application::initialize($fileDir . '/library', $fileDir);
XenForo_Application::set('page_start_time', $startTime);

$fc = new XenForo_FrontController(new XenForo_Dependencies_Public());
$fc->run();
If somebody has suggestions to load xenForo entirely on an external page, or a better idea to integrate xenForo inside Wordpress, please let me know!

edit: Keep in mind I am a newbie to xenForo, discovered it a few years back though this is the first time I've used it!
 
#2
Well, I got it working. Ended up initializing Wordpress in a template callback, loading the Wordpress header & footer within the page container template, and cleaning up the xenForo style's header/footer html. Still have some javascript and html validation issues, probably some responsive issues as well, but it's all tedious trial and error work, the hard part is finished :p

edit: I did have to hack Wordpress with 3 lines of code, which is unfortunate. Every time Wordpress updates I'll be re-applying the hack
 
#3
Hi Jake, I'm trying to embed xenforo into a wordpress page at the moment, can you elaborate on your process in deltail what you did to accomplish this please? I would be very thankful!