WordPress Login Logout Link Changes

Step 1 :  Login and Logout Condition :

<?php
if ( is_user_logged_in() ) {
echo '<a href="'.wp_logout_url( get_permalink() ).'" title="Logout" class="profile"><input type="button" value="Log out"></a>';
 
} else {
echo '<a href="'.wp_login_url( get_permalink() ).'" title="Login" class="profile"><input type="button" value="Log in"></a>';
}
?>

 

Leave a Reply

Your email address will not be published. Required fields are marked *