WordPress – wp redirect users only when logging in (1 time) if on homepage
I have the following code to redirect users which are logged in and on the homepage: function add_login_check() { if ( is_user_logged_in() && is_page(7) ) { ?> <script>window.location='/user-area/'</script> <?php exit(); } } add_action('wp', 'add_login_check'); But I am trying to modify…