I was wondering how can I redirect users to my hompage after they logged out when they hit the back button, kind of like facebook does. I was playing around with some javascript but nothing seemed to work.
PS: This will be for a Wordpress theme.
I was wondering how can I redirect users to my hompage after they logged out when they hit the back button, kind of like facebook does. I was playing around with some javascript but nothing seemed to work.
PS: This will be for a Wordpress theme.
Hi there check the wp_logout_url($redirect_url).
Javascript seems like the way to do it. Simply check if the user is logged and if not, do a redirect to the home page via a document.location = "http://my.home.page";
I guess that you have the session in PHP too so you could just do the redirect there instead of relying on Javascript.
If you use sessions, you can check if the user is logged in when viewing an authenticated page, and if not, send the headers to your homepage.