Welcome Guest, Not a member yet? Register   Sign In
codeigniter integrate wordpress
#21

[eluser]Unknown[/eluser]
[quote author="Dan Horrigan" date="1278025119"]No...you cannot integrate Wordpress in CodeIgniter. That question is very ridiculous. I don't know of any blog software off the top of my head written in CI, however you can create a basic one yourself pretty easily.

Here is the Blog in 20 minutes video for CI. It is a little old, but the basics are the same: http://codeigniter.com/tutorials/watch/blog/

Dan[/quote]

I'm new here. thanks for that tutorial link. I'm going to learn a lot from this great forum.

cheers!
#22

[eluser]Rolly1971[/eluser]
i know this thread is a bit older now but thought i would put my two cents in.

Yes, you can integrate Wordpress into CI. Anything is possible. It is a matter of how much work you are willing to put in.

one approach would be to create one hell of a wrapper class to access WP and wrap it up as if it were just another class, possible? yes, easy? no. feasible? probably not from a workload point of view.

saying that however, i do know of one commercial project where a company did a full (almost 100%) integration of wordpress into joomla. Incuding administration. Probably using some type of json, ajax, rest, or curl functionality of some sort. It is an impressive intigration.

Not something i seriously interested in when i found it, but it was cool none the less.

For the life of me i cannot remember what the site was, but like i said, it was a commercial component/mod/plugin set for joomla and rather pricey from what i remember.

so yeah, it can be done. Anything can be done, just a matter of how driven you are and how much work you are willing to put into it.

never say 'can't' , 'cannot' , or 'impossible' because those statements are 100% blatantly wrong.
#23

[eluser]newkiwi[/eluser]
@Rolly1971

Just adding my 2 cents

Just today integrated CI into WP which is easier and prob more useful for
- WP templates ++++
- WP admin interface

This supports both CI and WP urls and I can pass html from CI to display inside WP

...few rel simple mods
- CI:MY_Router
- WP:wp-includes/template-loader.php
- Shared index.php
- add ci view variable to pass ci html to template index.php file.

Some of the implementations on the web seems quite complex

CI URIs go to CI controllers, while WP urls go to WP and a default CI controller

Now need to link in the current logged user id - if you know how it would be appreciated
#24

[eluser]gowrav vishwakarma[/eluser]
if Using CI fro Joomla development can work for joomla. a seamless integration of CI and joomla. then it can be for wordpress.. just search xCIDeveloper in google... it is a wonderfull system so that you can now developer your components and modules in CI for joomla..
#25

[eluser]Peter Drinnan[/eluser]
[quote author="Jeroen Schaftenaar" date="1278427376"][quote author="Dan Horrigan" date="1278025119"]No...you cannot integrate Wordpress in CodeIgniter. That question is very ridiculous. I don't know of any blog software off the top of my head written in CI, however you can create a basic one yourself pretty easily.

Here is the Blog in 20 minutes video for CI. It is a little old, but the basics are the same: http://codeigniter.com/tutorials/watch/blog/

Dan[/quote]

Actually Dan, your answer is very ridicilous! It would be perfectly doable. I did something similar with a site of mine! I would use wordpress for all the back end stuff and CI for the frontend parts. The one thing I had to do was write some models to grab the data from db... Piece of cake! The thing is, Everything is possible with CI :-)[/quote]

It turns out to very easy to integrate Wordpress into CodeIgniter. Here's how it works...

If someone types in a url that would normally return a 404 in CodeIgniter, the CI router then calls a method in the main controller that boots up Wordpress and sort of passed the buck along. If Wordpress can make use of the url it will load the page otherwise it will return a 404. It is an elegant fallback process.

It requires 3 small steps.

1.) In the front controller (/index.php) added this line:

require_once ‘wp-load.php’;

2.) In application/config/routes.php changed the 404 route:

$route['404_override'] = ‘index/loadwordpress’;

3.) In /application/controllers/index.php add this function:

/**
* CodeIgniter Wordpress Boot
*
*/
public function loadwordpress(){

define(‘WP_USE_THEMES’, true);

/** Loads the WordPress Environment and Template */
require(‘./wp-blog-header.php’);

}




Theme © iAndrew 2016 - Forum software by © MyBB