A better way to get stats
You’ve got one very large issue here – you’re using $_SESSION. WordPress, by default, doesn’t use session variables. So isset( $_SESSION[‘vsp_user’] ) will always return false because WP isn’t keeping track of things. There are some additional changes you’ll need to make and hooks you’ll need to tie in to in order to enable sessions … Read more