WordPress.org

Ready to get started?Download WordPress

Forums

Login/out without going to WP Default Login Page/Dashboard but referring page (2 posts)

  1. ken123
    Member
    Posted 6 years ago #

    I have a situation that I have a page that have hidden text in it. Only the subscriber can see it after they login.
    In that page, I want to send the user to login, after login, Can I send the user back to the referral page (the page has the hidden page) instead of dashboard?
    Another alternative is, a login on the sidebar, once login, go back to the current page instead of dashboard.
    Thanks.

  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    Make yourself a link to wp-login.php with the redirect_to variable set. Like this:

    http://example.com/wp-login.php?redirect_to=http://example.com/whatever/

    After they login, they'll be redirected to whatever you want.

Topic Closed

This topic has been closed to new replies.

About this Topic