login - Wordpress Logged out code -


i'm new wordpress , looking code show login link on top bar , on menu, 'my account' page show logged in users.

i can find coding is_user_logged_in() doing reverse of i'm looking for.

using menu items visibility control plugin, unless there's better solution out there?

the function cited should work fine use case.

if ( is_user_logged_in() ) {     // show account link } else {     // show login button } 

or, if need check if user not logged in:

if ( !is_user_logged_in() ) {     // } 

Comments

Popular posts from this blog

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

post - imageshack API cURL -