Logout redirect to home page

I’m using custom menu for login/logout here below is my code: <li> <?php if (is_user_logged_in()) { $user = wp_get_current_user(); echo ‘Welcome <strong><a href=”http://kolkataonwheelsmagazine.com/wp-admin/index.php” >’.$user->user_firstname.'</a></strong> | <a href=”http://kolkataonwheelsmagazine.com/wp-login.php?action=logout&quot;”>Logout</a>’; } else { ?> <strong><?php wp_loginout(); ?></strong> or <a href=”<?php bloginfo(‘url’) ?>/wp-login.php?action=register”> <strong>Register</strong></a> <?php }?> </li> but problem is : redirect to login page not current page… I … Read more

How to log out without confirmation ‘Do you really want to log out?”?

Right now when I log out via: <a href=”https://wordpress.stackexchange.com/questions/67336/<?php bloginfo(“url’); ?>/wp-login.php?action=logout”>Log out</a> it redirects me to the page where I need to confirm the log out. How to eliminate the confirmation and redirect to the homepage after logout? 5 This happens because you are missing the neccessary nonce in the URL, which is being checked … Read more