Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

How can i redirect user after session timeout in multisite to my custom Page?

Normally Wordpress multisite redirects users to example.com/subdirectory/wp-login.php

share|improve this question
    
Have you looked at tying this onto your function? codex.wordpress.org/Function_Reference/wp_redirect –  GhostToast Jun 17 '13 at 13:55
add comment

1 Answer

You can filter the login_url:

add_filter( 'login_url', 'wpse103239_login_url' );
function wpse103239_login_url() {
    return 'your-login-url';
}

See also this answer for a bunch more options.

Reference

The login_url filter is mentioned in the Codex page for wp_login_url(), but there doesn't seem to be a Codex page for the filter itself.

share|improve this answer
    
thank you Pat J –  Ghinnersmee Jun 17 '13 at 19:04
    
No problem. If my answer worked for you, please mark it Accepted. –  Pat J Jun 17 '13 at 19:16
    
I just added your code and I realized that I use it already for make the login mydomain.com/login .....so I think it has nothing to do with "session timeout" –  Ghinnersmee Jun 17 '13 at 22:47
    
I'm not sure I see the difference between "session timeout" and "need to log in". –  Pat J Jun 17 '13 at 22:51
    
ok ,in multisite When the session timeout ends the user is redirects to example.com/subdirectory/wp-login.php ...in my case I want to redirect my users to my login page example.com/login already set with your code –  Ghinnersmee Jun 17 '13 at 23:26
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.