Why doesn't my logout link work?
-
I am using a child theme of twentyten. For some reason this code, which worked fine before in 3.0, doesn’t work and even more puzzling, only in Firefox. In Firefox, I click Log out, which does nothing. If I click it again, I get the “WordPress Failure Notice” screen which asks whether I really want to log out. I click log out there, and even that doesn’t work. Baffling and befuddling!
<?php if (is_user_logged_in()) : global $current_user; get_currentuserinfo(); ?> Logged in as <?php echo $current_user->display_name; ?> | <?php if ($current_user->user_level >= 5) : ?> <a href="<?php bloginfo('wpurl'); ?>/wp-admin">Site Admin</a> <?php else : ?> <a href="<?php bloginfo('wpurl'); ?>/wp-admin/profile.php">Profile</a> <?php endif; ?> | <a href="<?php echo wp_logout_url( get_permalink() ); ?>">Log out</a> <?php else : ?> <a href="<?php echo wp_login_url( get_permalink() ); ?>" title="Login">Log in</a> | <a href="<?php bloginfo('wpurl'); ?>/wp-register.php" title="Create an account">Create account</a> <?php endif; ?>
- The topic ‘Why doesn't my logout link work?’ is closed to new replies.