Comments

  1. What about redirecting based on user roles?

    Let’s say you want those with the user role “Author” and above to be redirected to the backend while “Subscribers” should be redirected to the home page?

    • jony says:

      you need a plugin for that you will get that plugin from there http://wordpress.org/extend/plugins/peters-login-redirect/

    • Donna says:

      Thanks, with this little tweak my site is totally user friendly.

      I have on my site links to differing parts based on user roles. So my subscribers just get access to their profile, and myself acess to the dashboard etc. The links are not visable till the person is logged in.

      The code is such:
      = 1 ) : ?>
      <a href="/wp-admin/”>Dashboard
      <a href="/wp-admin/post-new.php”>Submit post
      = 1 ?>
      <a href="/wp-admin/profile.php”>Profile
      <a href="” title=”Logout”>Logout

  2. Wham says:

    I was also wondering if it is possible that after someone logs into wordpress it just goes to the page before they logged in. So whatever page they were on before they went to the login page, they would go back to that.

    Very useful though. My only reason is using the multisite, some people are so deep in their blogs it would be annoying to have them start at the main page again.

  3. Edwin says:

    Thanks, I just copied and pasted it, it was that easy. Plus it’s upgrade proof too. Saved me quite a bit of hassle, cheers.

Trackbacks

  1. [...] This post was mentioned on Twitter by Brad Williams, Tim Kissane, Mark McWilliams, topsy_top20k_en, topsy_top20k and others. topsy_top20k said: New blog post: How To: Redirect A User After Logging Into WordPress http://bit.ly/aAI0Ev [...]

  2. [...] With some additional code in the functions.php file, we can redirect users to the blog once they’ve logged in, instead of the user profile page in the admin section (this one thanks to Brad Williams): [...]

Speak Your Mind

*