Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
The is_user_logged_in() function checks if the user is logged in. If you are automatically authorized after registration, then you should use the condition
<?php if (!is_user_logged_in()): ?>
<form> Ваша форма </form>
<?php endif; ?>
add_action( 'register_new_user', 'action_register_new_user' );
function action_register_new_user( $user_id ){
if (!session_id()) session_start();
$_SESSION['hide_auth_form'] = true;
}
<?php
if (!session_id()) session_start();
if (isset($_SESSION['hide_auth_form']) and $_SESSION['hide_auth_form']):
?>
<form> Ваша форма </form>
<?php endif; ?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question