Re-Direct ALL Users to the Home Page IF not logged in

Perhaps something like this? add_action( ‘template_redirect’, ‘not_logged_in_redirect_home’ ); add_action( ‘do_feed’, ‘not_logged_in_redirect_home’ ); function not_logged_in_redirect_home(){ if ( is_user_logged_in() ){ return false; } if ( ! is_home() // use this option if you show blogs posts on the home page // ! is_front_page() // use this if you show a static page ){ wp_redirect( home_url() ); exit; … Read more

wp_logout_url redirect not working

Use this logout link <li class=”signOut”><a href=”<?php echo wp_logout_url(); ?>” title=”Logout”>Logout</a></li> And add below code in your functions.php file to redirect the user to the page you want: add_action( ‘wp_logout’, ‘auto_redirect_user_after_logout’); function auto_redirect_user_after_logout(){ wp_redirect( ‘https://example.com/haendler-login/’ ); exit(); }