Answer the question
In order to leave comments, you need to log in
How to add login and registration links in the header of a WordPress site?
I need that in the header of the site, when a person is not authorized, links to login / registration are displayed, and when authorized - the user's nickname and a link to logout.
Answer the question
In order to leave comments, you need to log in
if ( is_user_logged_in() ) {
# пользователь авторизован
} else {
# пользователь НЕ авторизован
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question