Redirect after sign up with woocommerce form with role choice [closed]

user_register hook fires immediately after a new user is registered. so you have to add action on this hook. You can add below example code in your active theme’s function file. Example : add_action( ‘user_register’, ‘redirect_user_based_on_role’, 10, 1 ); function redirect_user_based_on_role( $user_id ) { // Get the user object. $user = get_userdata( $user_id ); // … Read more

My Pages Have Been Redirected Automatically in WordPress. How to Stop It?

Yes, WordPress sometimes automatically redirects URLs under certain conditions when it detects changes in the permalink structure or slugs Check Permalink Settings: Go to Settings > Permalinks in your WordPress dashboard. WordPress Redirect Rules in .htaccess file Disable Plugins that Handle Redirects if any activated for WordPress dashboard If you have checked WordPress Core and … Read more

Want to be able to redirect readers to another wordpress site but still be able to access the back end of current site

You can do it with the “template_redirect” hook. For multisite or simple WordPress. e.g: add_action(‘template_redirect’, function(){ $user = wp_get_current_user(); $userRoles = $user->roles; $url = site_url(); if(!in_array(‘administrator’, $userRoles) && !is_front_page()){ wp_redirect($url); exit; } }); EDIT is_front_page() will work only if “Front page displays” is set. Use is_home() if not. EDIT #2 Accordind with our discuss below, … Read more

techhipbettruvabetnorabahisbahis forumutaraftarium24eduedusedueduedusedueduedueduedus