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

sql - VB.NET Operand type clash: date is incompatible with int error -

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

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -