Call Chris at (615) 521-1890 for a free quote.
615.521.1890
Nashville Interactive - Home

Blog

Changing Signup/Register Link in WordPress

Mar 4 2010

This gets placed in your theme’s functions.php… ‘Signup’ is the text for the register link in this example. ‘Logout’ is the message displayed when the user is logged in. That could easily be a link to their profile or the admin area as well.

add_action( ‘register’ , ‘register_replacement’ );
function register_replacement( $link ){
if ( ! is_user_logged_in() ) {
if ( get_option(‘users_can_register’) )
$link = $before . ‘<a href=”‘ . site_url(‘wp-login.php?action=register’, ‘login’) . ‘”>’ . __(‘Signup’) . ‘</a>’ . $after;
else
$link = ”;
} else {
$link = $before . ‘<a href=”‘ . wp_logout_url() . ‘”>’ . __(‘Logout’) . ‘</a>’ . $after;
}
return $link;
}