Welcome Guest, Not a member yet? Register   Sign In
Embedding Wordpress in CI
#1

[eluser]Unknown[/eluser]
I'm currently in the process of rewriting my site using CI. In connection with that I decided to use an embedded instance of Wordpress for the site news. I have been following the instructions at http://www.shooflydesign.org/buzz/past/e...press.html on how to embed WP.

The above link explains how to include an internal WP file using require(), and then call the global functions of WP to render blog-entries and get data from the WP framework.

It works fine as long as I follow the example given, and keep the code out of reach of CI.

In CI, it seems that no matter how I include the internal WP file, I do not get access to the WP functions. I've confirmed that the file actually gets executed, but it seems that CI somehow prevents me from calling the functions. If I move all the code to an external file, which I then execute by including it from a CI - file (eg. a view), everything works perfectly. Unfortunately, this has the disadvantage of completely isolating CI from my code, which prevents me from passing parameters between WP and CI!

Does anyone know if it is possible to do what I outlined in the first paragraph within CI? Has anyone else attempted to do a similar integration of another application into CI? Hope someone here will be able to help. Thanks in advance.




Theme © iAndrew 2016 - Forum software by © MyBB