Last active
December 14, 2015 13:28
-
-
Save melissacabral/5093303 to your computer and use it in GitHub Desktop.
wordpress login form. place anywhere in your theme templates to display the form
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//show the form if the user is not logged in | |
if( !is_user_logged_in() ): | |
wp_login_form(); | |
else: | |
$redirect = home_url(); | |
echo '<a href="'.wp_logout_url( $redirect ).'">Log Out</a>'; | |
endif; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment