1. 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

Discussion in 'XenForo Development Discussions' started by Jake Evans, Dec 18, 2013.

  1. Jake Evans

    Jake Evans New Member

    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:

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

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

    XenForo_Application::initialize($fileDir '/library'$fileDir);

    $fc = new XenForo_FrontController(new XenForo_Dependencies_Public());
    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. Jake Evans

    Jake Evans New Member

    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. Delta3D

    Delta3D Member

    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!
  4. LPH

    LPH Well-Known Member

    Can you create a file with the WP functions you are changing so you don't need to recreate with each update?
    Adam K M likes this.

Share This Page