Loading...
Close
Back to Blog

Changing Signup/Register Link in WordPress

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;
}

Leave a Reply

You must be logged in to post a comment.

Back to Blog
Call (615) 521-1890 now for a FREE QUOTE on your project

Call (615) 521-1890 now for a FREE QUOTE on your project

RSS RSS Nashville Interactive on Twitter Check out Nashville Interactive on Facebook
Close Open