Close Menu
My SiteMy Site
  • Home
  • Reviews
  • Computers
  • How Tos
  • Travel & Lifestyle
  • Phone ROMs
  • Contact
    • Advertise
    • About Us
Facebook X (Twitter) Instagram
My SiteMy Site
  • Home
  • Reviews
  • Computers
  • How Tos
  • Travel & Lifestyle
  • Phone ROMs
  • Contact
    • Advertise
    • About Us
My SiteMy Site
Home»Web Design Tips»Wordpress»How to Redirect WordPress Users to Current Page After Login
Wordpress

How to Redirect WordPress Users to Current Page After Login

Oscar FrankBy Oscar Frank1 Min Read
Share
Facebook Twitter LinkedIn WhatsApp Pinterest Email

Let’s say you own a multi-author wordpress blog, or a membership wordpress blog and you place a link to Login page on your blog’s theme. Now you wish to redirect every user to the same page he/she was before clicking on the Login Link on your theme instead of been redirected to the WordPress Dashboard.

For instance, a user was on your contact us page and decides to login by clicking on your login link at your sidebar, but you wish the user to be redirected back to the contact us page after login is successful instead of the wordpress dashboard backend, then here is a guide for you.

One thing I love about WordPress is because it’s got lots of function, we will be making use of the wp_login_url() wordpress function for this.

How to Automatically redirect to current page after login
Instead of placing the link directly to your login page from theme as

<a href=”http://yoursite.com/wp-login.php”>Click Here to Login</a>

Simply use the link below as

<a href=”<?php echo wp_login_url(get_permalink()); ?>” title=”Login”>Click Here to Login</a>

That’s it. A helpful wordpress tip

Wordpress

Related Posts

WordPress Blog Hosting made easy with SeekaHost Blog Hosting Control Panel

December 4, 2020

How to Create a Website with Elementor Page Builder in WordPress

April 1, 2019

Top 3 Reasons Backing Up Your Files Offsite Is Extremely Important

February 27, 2018
View 2 Comments

2 Comments

  1. Olawale Daniel on October 18, 2014 8:29 am

    I found this helpful and resourceful. Thanks a lot Oscar!

    Reply
    • Oscar Frank on October 19, 2014 1:39 pm

      I’m glad you did Dan. Thanks for dropping by. 🙂

      Reply
Leave A Reply Cancel Reply

Recent Posts
  • 6 Sports Apps You Must Have On Your Phone
  • Valencia Travel Guide: All You Need to Know About This Spanish Gem
  • TikTok Faces Unexpected Ban in Senegal, Sparks Global Curiosity
  • The Apple GPT & Apple’s Chatbot Mysterious Debut
  • Triller Takes on TikTok: Filing for Public Listing
Get Exclusive Tech Insights!
My Site
Facebook X (Twitter) Instagram YouTube
© 2025 Oscarmini Co. Designed by illBytes.

Type above and press Enter to search. Press Esc to cancel.