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

Popular posts from this blog

SVG stroke-linecap doesn't work for circles in Firefox? -

routes - Laravel 4 Wildcard Routing to Different Controllers -

cross browser - XSLT namespace-alias Not Working in Firefox or Chrome -