I create a worpdress plugin, and I have a big problem, wp_redirect is not working.
this is my code:
<?php
if (is_user_logged_in())
{
echo 'loggedin';
}
else
{
echo network_home_url( '/receptionist' );
wp_redirect( network_home_url( '/receptionist' ) );
exit;
}
?>
I also try wp_safe_redirect and header to redirect, but no result.
Can some one help me to found the error
Try following
You can work with javascript, add this code: