views:

934

answers:

2

I have a website, with a user system. I want to integrate wordpress's user system into that website's, but I still want to use the website's register/login pages. I don't want anybody to be able to login or register using Wordpress's login or registration forms. Instead, when they're try to access the login/registration pages in Wordpress, I want those pages to redirect them to my own login/registration pages.

Is there any way of doing this? I've tried Google, but all I could find was redirection AFTER the user logs in or registers, which is not what I want.

Thank you in advance.

A: 

You might be able to latch onto the login_head hook and issue a redirect there.

ceejayoz
+4  A: 
add_action('init','possibly_redirect');

function possibly_redirect(){
 global $pagenow;
 if( 'wp-login.php' == $pagenow ) {
  wp_redirect('http://google.com/');
  exit();
 }
}
nickohrn
This worked for me, thank you :)
Bruno De Barros
Where shall I register add_action call? where do I call this ? excuse me for I'm a .Net developer.
this. __curious_geek
You have two options. Either throw the above code in a plugin or create a functions.php in your themes' folder and add the above.
nickohrn