how to share SESSION with WP |
Hi, everybody,
I'm working on a microsite in CI and this microsite will generate some session data. on the same Host & domain, we have another website with is WordPress. I would like to make use of CI session generate in Wordpress website. ![]() example: set on CI PHP Code: // http://www.website.com/cp/ call it on WP header.php PHP Code: // http://www.website.com/ Is it possible to do so? ![]() Please show me the correct approach. ![]() Thanks in advance
You would need to edit and change every WordPress file that used sessions
So personally I would not recommend it at all. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
isn't possible to just check that session in header.php in WordPress?
so if i must edut every WP file that used session, how can be possible? could you show some demo code?
Hi Ardavan,
I've done the opposite way, I've utilized the Wordpress login and sessions, and then referenced the sessions on the CI side. It works, but it pulls in more of the wordpress side functionality than I would like, and you have to be careful when Wordpress major updates happen. If that is of interest to you, let me know. Bob (03-26-2018, 02:19 AM)ardavan Wrote: Hi, everybody,
Sign up for Codeigniter Slack Chat
Hey Bob, thanks for your reply,
So if you have done the opposite way, that means I can do another way around. basically, my microsite is a user management for the WordPress website and will generate some session that can use in the WordPress(of course there will be some hard coding in the WordPress header.php). My question is if the session works on a domain, so I can get the session in a plain PHP code right? what I am thinking is to generate a session in plain PHP (in the microsite - CI) and then call that session in plain PHP (in the WordPress - header.php) set on CI PHP Code: // http://www.website.com/cp/ call it on WP header.php PHP Code: // http://www.website.com/ how can I do this? I mean that is my first time and idk how to make this to happen. any idea? (03-26-2018, 08:38 PM)visualsol Wrote: Hi Ardavan, |
Welcome Guest, Not a member yet? Register Sign In |