I need to be able to check if a user is logged in without including any files. Is there a way to do this with cookies or something else?
I need to be able to check if a user is logged in without including any files. Is there a way to do this with cookies or something else?
<?php
if ( !is_user_logged_in() ) {
//not logged in
} else {
//is logged in
}
?>But this is an external page so is_user_logged_in() is not yet a function
[moderated--bump removed. Please refrain from bumping as per Forum Rules]
Would normally point you to Integrating_WordPress_with_Your_Website, but since your requirement is "without including any files" then look at WordPress Cookies.
Related:
http://wordpress.org/extend/plugins/tags/authentication
How do I use these cookies to check if they are logged in?
Not sure but maybe these will help:
http://www.google.com/search?q=wordpress+cookies+for+login
This topic has been closed to new replies.