close
Blipverts

Make Session Variables Available in WordPress

18

Require the bootstrap file in your custom WordPress .php in order to make all of the WordPress system resources available to your page, including session variables:

1
require_once(‘../../../wp-load.php’); //path to wp-load.php

If sessions aren’t already getting started, you can manually start them with:

1
if(!isset(session_id())) session_start();
admin

The author admin