php - is_logged_in function always return false for http://domain.com/wordpress -
is_logged_in()
function return false
i believe because wordpress hosted in sub domain due cookies not correct path.
so tried using define('cookie_domain', './wordpress');
in wp-config.php
it not working.
am setting cookie right?
please !!
try this
<?php if ( is_user_logged_in() ) { echo 'welcome, registered user!'; } else { echo 'welcome, visitor!'; } ?>
Comments
Post a Comment