The comment by ‘warm_tape’ is correct. Use home_url(), then put a die() after the wp_redirect to ensure that the accessed page will ‘die’ and not interfere with your main page.
Related Posts:
- Is there any way to rename or hide wp-login.php?
- Increase of failed login attempts, brute force attacks? [closed]
- How to fake a WordPress login?
- Brute force attack?
- Stop users from logging in from multiple locations
- Receiving “This content cannot be displayed in a frame” error on login page
- Websites defaced by uploading script using theme editor
- Make wordpress admin failed login attempt return 401
- advance membership managment
- WordPress login urls
- Store brute-force IP addresses
- How to create a private login page for admin.?
- WordPress Security – How to block alternative WordPress access
- Protecting WordPress login page
- wp-admin folder, brute force, and password protection
- Sniffing wordpress user’s credentials
- disable site_url redirect in wp-login.php
- Does WordPress (or a plugin) reveal login credentials to admin?
- Is wp_login_form secure on a non secure page?
- WordPress login security
- Why isn’t the login page rate limited by default?
- How can I password protect a WordPress site without requiring users to log in?
- Input sanitation
- How to Prevent Brute Force Attack on WordPress
- Where is the php file, that does the checks for login information?
- Error on WordPress Login
- Access log “POST /wp-login.php HTTP/1.0” 400
- force login loophole
- I need to find which is the file that checks the DB for correct login (username, password)
- Membership Plugin with Facebook integration [closed]
- How to create separate login for authors/moderators/subscribers?
- How to invalidate `password reset key` after being used
- Site is not loading after relogin attempts on SSL
- Some crawlers/bots attempting to login with very good guesses. How?
- User login without username, only password
- Hide wp-login.php but not the widget
- How login is possible, if I deny login page via nginx?
- Username character requirements
- WordPress EC2 Security Practices
- In Django, how do I know the currently logged-in user?
- Can I programmatically login a user without a password?
- Can’t log in: “ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.”
- What’s the easiest way to stop WP from ever logging me out
- How to login with email only no username?
- How can I redirect user after entering wrong password?
- Login page ERROR: Cookies are blocked due to unexpected output
- Separate registration and login for different roles
- SSO / authentication integration with external ‘directory service’
- Preventing session timeout
- How reduce wordpress login session timeout time?
- How to prefill WordPress registration with social details
- Check for correct username on custom login form
- Disallow user from editing their own profile information
- I can’t access my site via wp-admin
- ‘Password field is empty’ error when using autofill in Chrome
- Removing username from the ‘wordpress_logged_in’ cookie
- How to show ‘login error’ and ‘lost password’ on my template page?
- What is $interim_login?
- Custom login form
- How to prefill the username/password fields on the login page
- wp_signon returns user, but the user is not logged in
- Adding extra authentication field in login page
- Prevent wp_login_form() from redirecting to wp-admin when there are errors
- Redirect user using the ‘wp_login_failed’ action hook if the error is ’empty_username’ or ’empty_password’
- wp_signon() does not authenticate user guidance needed
- What exactly is ReAuth?
- What are the differences between wp_users and wp_usermeta tables?
- Can someone explain what wp_session_tokens are, and what are they used for?
- Login members using web services
- Make my wordpress blog remember my login “forever”
- How to check in timber if user is loggedin?
- How do I change the language of only the login page?
- Disable WordPress 3.6 idle logout / login modal window / session expiration
- Stop WordPress from logging me out (need to keep me logged in)
- Woocommerce registration page [closed]
- How to disable autocomplete on the wp-login.php page
- Share login data/cookies between multiple installations
- Synchronize WordPress user accounts across multiple domains and installations without using WordPress MU
- How to pass users back and forth using session data?
- How do I change the logo on the login page?
- Why does WordPress hide the reset password key from the URL?
- Is it possible to sign in with user_email in WordPress?
- How to use current_user_can()?
- Avoid to load default WP styles in login screen
- WordPress registration message
- how to display the wordpress login and register forms on a page?
- Limiting sessions to one IP at a time
- Does wp_logout_url() destroy a session? (Logging out question)
- How can I send a welcome email to a user AFTER they login for the first time?
- Can not login with correct username and password
- Website Visible only to Registered users
- How can i increase the login expiration length?
- How do I use add_action from a class method?
- How to remove the WordPress logo from login and register page?
- How can I add a custom script to footer of login page?
- Customize wp_new_user_notification_email()
- Need to execute a cron job
- Masking logout URL
- Login email after registration never sent or received
- How can I create a separate blog that is private?