Unable to update plugin code | Peter's Login Redirect | Forum
Back to the login redirect plugin page
11:17 am
Hi, I upgraded to version 2 today and then went to insert the recommended code that redirects users back to the Home page when they logout viz:
function redirect_logout_front_page() {
wp_redirect(get_option('siteurl'));
die();
}
add_action('wp_logout', 'redirect_logout_front_page');
I added it right at the end of the main module code as I am sure I have done before.
When i clicked on update code it went off to a a "we are unable to find your request...." page
Tried again after first de-activating the plugin - same result.
Same result also if I just go into editor and click update without making any changes.
Tried same with other plugins (deactivate and not make any changes) and it seems to work OK though got the same result with Akismet.
Hope I have explained properly.
Any ideas? Help!
Regards.
Steve
5:33 am
I think I'm having the same problem. The plugin is working great for login and redirect, but when logging out, I just want the subscriber to redirect to http://www.lawcaselogic.com
Can you tell me what the code should look like for this, and where specifically I would insert the code in the plugin editor?
Thanks! Great plugin!
Hi, the logout code should work if you're using a version of WordPress higher than 3.0; you've entered a "Logout URL:" for "All other users" in the "Login/logout redirects" configuration page; and you're not using a hard-coded logout link. (The logout URL is technically implemented by adding a "redirect_to" parameter to the logout link.)