Answer the question
In order to leave comments, you need to log in
Setting up a personal account, how to do it?
I am creating an online store, in the header of the site there is "Authorization" and "Registration", is it possible to make it so that after Authorization by the user he is transferred to the main page and instead of "Authorization" and "Registration" he sees something like "You are authorized as : <username>"
Answer the question
In order to leave comments, you need to log in
if ( is_user_logged_in() ) {
echo 'Вы авторизованы на сайте!';
тут пишешь строчку для редиректа на главную
}
else {
echo 'Вы всего лишь пользователь!';
}
if ( is_user_logged_in() ) {
global $current_user;
wp_get_current_user() ;
echo 'Вы авторизованы на сайте как '. $current_user->user_login;
}
else {
вывод кнопок авторизация регистрация
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question