Languages: English • 日本語 (Add your language)
This tag displays either the "Site Admin" link if the user is logged in or "Register" link if the user is not logged in.
The "Register" link is not offered if the Administration > Settings > General > Membership: Anyone can register box is not checked.
This tag does not function as intended on WordPress µ.
<?php wp_register( $before, $after, $echo ); ?>
wp_register displays the link in list format <li>.
<?php wp_register(); ?>
The following code example displays the "Register" or "Site Admin" link with no text in before or after parameters.
<?php wp_register('', ''); ?>
When not logged in the following HTML is produced:
<a href="http://www.example.com/wp-login.php?action=register">Register</a>
When logged in the following HTML is produced:
<a href="http://www.example.com/wp-admin/">Site Admin</a>
On WordPress µ, there is no /wp-register.php file, and /wp-login.php?action=register is not a valid registration form. Thus, wp_register function does not show a registration link.
Since: 1.5.0
wp_register() is located in wp-includes/general-template.php
.
Login Tags:
is_user_logged_in(),
wp_login_form(),
wp_loginout(),
wp_logout(),
wp_register()
Login URLs:
wp_login_url(),
wp_logout_url(),
wp_lostpassword_url(),
wp_registration_url()