WordPress.org

Ready to get started?Download WordPress

Forums

Page Security by Contexture
Controlling redirect upon login (2 posts)

  1. EfremJ
    Member
    Posted 1 year ago #

    Hello,

    Where can I control where users get redirected to once they log in?

    I simply want them to go to my home page, not to one of my latest posts or to a specific Page. Just want them to go to the main home page of my site.

    Thanks.

    http://wordpress.org/extend/plugins/contexture-page-security/

  2. Matt van Andel
    Member
    Plugin Author

    Posted 1 year ago #

    There's a simple trick that can be used in vanilla WordPress to do exactly this.

    Simply add a ?redirect_to=%2F querystring variable to your login links and users will be automatically be redirected to the homepage when they log in.

    Example (put this in your href):

    http://example.com/wp-login.php?redirect_to=%2F
    

    Note: %2F is the url-encoded version of / (forward-slash). If you have bigger urls, you can encode them with online tools like this.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic