Home / admin / Prevent access to wp-admin redirect subscribers to home page
  • Pingback: Tweets that mention WPSNIPP – wpsnipp.com Wordpress code snippets for your blog -- Topsy.com()

  • Does it matter where we add it?

    • Just into the functions.php the location within that file does not matter.

  • Shalini

    Wow thanks honey :)

  • Doesn’t work for me.

  • Eduardo

    Thank you very much, it works but redirects me to another login.php panel, can’t it be home?

  • Ron

    if you want it to redirect your homepage and not the login page us this:

    header( ‘Location: ‘.get_bloginfo(‘home’).’/?redirect=’.get_bloginfo(‘home’).’/wp-admin/’ );

    instead of

    header( ‘Location: ‘.get_bloginfo(‘home’).’/wp-login.php?redirect=’.get_bloginfo(‘home’).’/wp-admin/’ );