Log out link in php code
-
Whats the correct way to display log out link in this php script?
When i use it in the sidebar it just removes the whole sidebar so i think im using it in a wrong way.<?php if ( is_user_logged_in() ) { <a href="<?php echo wp_logout_url( home_url() ); ?>">Logout</a> } else { echo 'Welcome, visitor!'; } ?>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Log out link in php code’ is closed to new replies.