Forum breadcrumbs – You are here:Asgaros Support ForumSupportLogout redirection
Please or Register to create posts and topics.

Logout redirection

Page 1 of 2Next

Hi,

are there any settings to redirect to a specific site after logout?

Thanks

Hey @petrap,

do you use the usual WordPress login? If so you can use the following code to redirect after logout:

// Call function after logout
add_action('wp_logout','redirect_after_logout');

// Redirict to an URL
function redirect_after_logout(){
  // Deactivate Caching
  nocache_headers();

  // Redirect to a given URL
  wp_redirect( 'https://www.YOURDOMAIN.com' );
  exit();
}

You can also search for a Plugin to redirect after logou.

Need professional help with Asgaros Forum? Book an appointment with us at domra Web Solutions for setup and customization services. Learn more about our Toolbox for Asgaros Forum plugin to enhance your forum experience.

Hey,

do you mean the user login to login into the forum or my administration login?

The login of the forum.

By default it’s the WordPress Login. Only if you use any membership plugins and you changed it manually it would be different.

Need professional help with Asgaros Forum? Book an appointment with us at domra Web Solutions for setup and customization services. Learn more about our Toolbox for Asgaros Forum plugin to enhance your forum experience.

Yes, we have a membership plugin.
In this plugin I have set up a logout site, this is the site where the user end us after logout of the forum. Acutally I want the user to redirect to another site than this after log out.

So I understand you correctly , in asgaros plugin there is no setting option for the redirection after log out?

Hey @petrap,

which membership plugin are you using? So you already set a redirect URL in this membership plugin and the users get redirected to this page?

If you didn’t set it in the membership plugin, did you try to use the code that I provided you?

Right now Asgaros Forum has not the ability by itself to change the redirect url in the WordPress admin area, but you can use some code to do so. I will also add this functionality in the next update of my Plugin.

Need professional help with Asgaros Forum? Book an appointment with us at domra Web Solutions for setup and customization services. Learn more about our Toolbox for Asgaros Forum plugin to enhance your forum experience.

Hey qualmy,

we use the UFWP (User Frontend) Plugin.
Yes, we have set up a redirect URL there, but we would like to redirect the user from the forum to an other page after the log out.

Where do I have to add the code you have provided?

Thanks for your help.

Hey @petrap,

you can easily add the code in an own plugin or a child theme. But you should have some basic knowledge of programming and WordPress.

I also updated my plugin right now. So you can easily edit the menu and set a redirect link for the logout button. Just let me know if need some help with my plugin.

Need professional help with Asgaros Forum? Book an appointment with us at domra Web Solutions for setup and customization services. Learn more about our Toolbox for Asgaros Forum plugin to enhance your forum experience.

Hey qualmy,

great, do I have to update the plugin somehow to have the new menu to set up the lou out redirection?

Thanks,

Petra

Hey @petrap,

to use the new feature you have to update to version 1.1.4

Need professional help with Asgaros Forum? Book an appointment with us at domra Web Solutions for setup and customization services. Learn more about our Toolbox for Asgaros Forum plugin to enhance your forum experience.
Page 1 of 2Next