I want to make client login form on the home page and when client login, I want the client to land into to specific page. Unless logged in, if tried to land to that page must be redirected to home page.
I have tried to use, Theme my login but did not get desired solution. I have tried to create my own widget area, and by password protecting the page. There are few problems that I faced.
- How to take user input and sanitaize it, I tried to use, wordpress esc_attr, esc_js, esc_html method, [Is that sufficient]
- I redirected the page to password protected page, but the password did not trigger the login.
- once I login to password protected page, it does not seem to log out even if I clear the cache or cookies.
So, basically, I want to have the solution. Thanks
Here is a great article that explains one solution to do what you are trying to do that I’ve personally used. http://justintadlock.com/archives/2012/10/16/how-i-run-a-membership-site
In your case you’ll want to customize the
th3_club_member_template
function to something like this:You can then use theme my login to set up the login form.
Once the user logs in you can either manually redirect them or use a plugin like Peters Login Redirect
To manually redirect them you can do something like this:
[Codex]
Our company uses WP-Client which is a plugin that allows to create client portals… you can make one for each individual client and control what they see when they login.
You can customize the login page even… it’s been pretty easy to setup and the support is really good.
Here is the website: http://wp-client.com