CodeIgniter Forums
Codeigniter with wordpress - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Development & Programming (
+--- Thread: Codeigniter with wordpress (/showthread.php?tid=53921)

Codeigniter with wordpress - El Forum - 08-14-2012

Hi all,

Ive searched the forum and found some answers to this issue but trying to provide more specific info to potentially get some help

Im trying to set up a Codeigniter application with a Wordpress instill located in a subfolder


www (Codeigniter App)
-/blog (WP install in sub dir)

Ideally we want to have CI handle login and register (and user profiles) due to a number of specific business rules - this is all done already using Ion Auth

Then we'd like some specific published pages/content to come out of Wordpress - I have the WP JSON plugin installed but ideally I want to just use WP

The main question I have is how do I keep a user logged in when switching between both platforms - I dont know too much about CI or PHP sessions so any help on how to access them from within Wordpress would be helpful

ie: if user is logged in - show links in the header to their profile and show their username in WP - if not, links to our Ion Auth sign up page (in CI of course)

Cheers and thanks

Codeigniter with wordpress - El Forum - 08-14-2012

Ive been able to Google this post about doing it

My question would be - do I drop the code suggested in the post into one of my WP theme PHP files? (basically like a CI view file)

Ive tried doing that and printing and echoing and getting no results




Codeigniter with wordpress - El Forum - 08-14-2012

So Ive also discovered that Ion Auth handles some user info I need to access

So I guess the question is how do I access this session info from Ion Auth within a Wordpress install setup like Ive outlined about in my original question?


Codeigniter with wordpress - El Forum - 08-17-2012

So Ive been able to get things working - I've just lost access to Wordpress's admin using this code below

But I'll keep trying to figure this out for anyone else.

Codeigniter with wordpress - El Forum - 08-17-2012

[eluser]Oscar Dias[/eluser]
Nice sources, thanks for sharing... Once I managed to get the integration working the other way around, enablig CodeIgniter to use WP functions. In my case WP managed the users. If you want to take a look, my 'experiments' are online: