OscarminiOscarmini
  • Home
  • Reviews
  • Gadgets
  • Computers
  • How Tos
  • Travel & Lifestyle
  • Phone ROMs
  • Contact us
    • Advertise
    • About Us
Facebook Twitter Instagram
  • Home
  • Reviews
  • Gadgets
  • Computers
  • How Tos
  • Travel & Lifestyle
  • Phone ROMs
  • Contact us
    • Advertise
    • About Us
Facebook Twitter Instagram
Oscarmini Oscarmini
Subscribe
  • Home
  • Reviews
  • Gadgets
  • Computers
  • How Tos
  • Travel & Lifestyle
  • Phone ROMs
  • Contact us
    • Advertise
    • About Us
OscarminiOscarmini
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
Facebook Twitter WhatsApp LinkedIn Email
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
Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
Oscar Frank
  • Website

A Nerd who blogs, makes music, Video-graphs, writes #codes and LOOPS the whole process for a living. Yeah! That's me. I'm on Facebook, Twitter or Instagram

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

Latest Posts

Microsoft advises users to Uninstall latest Windows 11 update

May 18, 2022

Topship Raises $2.5m Seed to Build Africa’s Flexport

May 18, 2022

Apple is Testing iPhones With USB-C Ports

May 18, 2022

Google Translate Adds 24 New Languages

May 16, 2022
Oscarmini
Facebook Twitter Instagram YouTube
© 2022 Oscarmini Co. Designed by illBytes.

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