Viewing 3 replies - 1 through 3 (of 3 total)
  • Thanks!

    Great post, it worked like a charm. I’m running WP 3.0.1 with buddypress and one of the links that I had to chase down and change was in the admin bar. If anyone else needs to do this after making carlla’s changes just put the following code in your template’s functions.php file:

    function new_login_link(){
    	global $bp;
    	if ( is_user_logged_in() )
    		return false;
    	echo '<li class="bp-login no-arrow"><a href="' . $bp->root_domain . '/login?redirect_to=' . urlencode( $bp->root_domain ) . '">' . __( 'Log In', 'buddypress' ) . '</a></li>';
    	// Show "Sign Up" link if user registrations are allowed
    	if ( bp_get_signup_allowed() ) {
    		echo '<li class="bp-signup no-arrow"><a href="' . bp_get_signup_page(false) . '">' . __( 'Sign Up', 'buddypress' ) . '</a></li>';
    	}
    }
    remove_action( 'bp_adminbar_menus', 'bp_adminbar_login_menu', 2 );
    add_action( 'bp_adminbar_menus', 'new_login_link', 2 );

    This will replace the function in the buddypress core adminbar file with a new function which swaps “login” for wp-login.

    adding the filter to site_url function seems not to work entirely for wp3.0.
    in detail: if i add the filter, the action of loginform on rootinstance/LOGIN works, but on subinstance/LOGIN the filter doesnt affect the action parameter of the loginform, making the form useless.

    here the produced tags:

    rootinstance/LOGIN:
    <form method=”post” action=”http://localhost/wordpress/login.php&#8221; id=”loginform” name=”loginform”>

    subinstance/LOGIN:
    <form method=”post” action=”http://localhost/wordpress/firstsubsite/wp-login.php” id=”loginform” name=”loginform”>

    how should i add the filter?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Change from wp-login.php to login’ is closed to new replies.