Tweaking the registration link at wpmu login page to point to buddypress registration page

Jotted by brajesh on November 6, 2009

well,It is not that hard.If you are using buddypress and a user is at yoursite.com/wp-login.php ,he may see a link of registration(obviously only if you have enabled it :) ) which points to yoursite.com/wp-login.php?action=register.

Now if you are using buddypress compatible themes, you must be interested in sending the user to yoursite.com/register in case they click on the registration link.

Well,so here is a small snippet of code to assist you.


/*let us keep an eye on the site_url*/
add_filter("site_url","my_custom_register_url",10,3);
function my_custom_register_url($url, $path, $orig_scheme)
{    /*if the site url is used in login contentxt,let us check for the register link*/
if($orig_scheme=="login")
{
if($path=="wp-login.php?action=register")//so it is a registration link..cool
return get_option('siteurl')."/".BP_REGISTER_SLUG;//let us replace it with  our buddypress registration page url
}

return $url;

}

?>

Drop this into the functions.php of your active theme and go and check ,any reference to yoursite.com/wp-login.php?action=register  will be pointing to yoursite.com/register(or what ever you set as registration page slug)

Hope it helps.Now I would love to hear ,how it went with you or what approach you are using .Go ahead and put your views in comments.

[blinklist] [Bloglines] [del.icio.us] [Digg] [dzone] [Facebook] [Ma.gnolia] [Mister Wong] [Reddit] [Sphere] [Sphinn] [StumbleUpon] [Technorati] [Email]


A quick update about the site

Jotted by brajesh on

hi there
October proved a very busy month for me and I was unable to get in touch with you wonderful people visiting here.
First of all ,thanks for visiting the site.

here is a quick update about what is going on:-

I have plans to test and release improved version of all my buddypress/wordpress Mu based plugins in near future.I will be releasing a few buddypress themes too.Well at least 2 free budydypress theme,one is just a child theme and another is highly customized theme.Keep yourself tuned for the updates.

And to keep up with the time,I enabled tweetmeme retweet button today,so now onwards you can even tweet the posts if you would like :)

My apologies to everyone who left a comment and I could not answer in timely manner,I am going to be regular and answer all of the queries … I just promised my self today :) So keep yourself tuned for more from this blog.
Happy blogging :)

[blinklist] [Bloglines] [del.icio.us] [Digg] [dzone] [Facebook] [Ma.gnolia] [Mister Wong] [Reddit] [Sphere] [Sphinn] [StumbleUpon] [Technorati] [Email]



Get Adobe Flash playerPlugin by wpburn.com wordpress themes