I’ve read some posts and did some fiddling but I can’t seem to get things going. I’m integrating WP into an existing webpage and from that page I’m trying to check on when a user is logged in.
I’m using the following code.
<?php global $user_ID; get_currentuserinfo();
echo "logged in";
echo "logged out";
When I use this in sidebar.php to test it it works fine, but on my test page it does not.
What am I missing? I have the
<?php $blog = 1; require('wordpress/wp-blog-header.php'); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
at the top of the page.
- The topic ‘Check for login outside WordPress’ is closed to new replies.