Wordpress Logout olduğunda aynı sayfada kalma ?
5
●177
- 04-06-2018, 09:49:26Orjinal kod bu;moss218 adlı üyeden alıntı: mesajı görüntüle
// echo $wpdiscuz->optionsSerialized->phrases['wc_logged_in_as'] . ' <div id="username"> <a href="' . $user_url . '">' . $wpdiscuz->helper->getCurrentUserDisplayName($currentUser) . '</a> </div> ' . " " . '|' . " " . '<div id="usernamelogout">'. $logout.'</div>';
Bu hale getirdim olmadı;
echo $wpdiscuz->optionsSerialized->phrases['wc_logged_in_as'] . ' <div id="username"> <a href="' . $user_url . '">' . $wpdiscuz->helper->getCurrentUserDisplayName($currentUser) . '</a> </div> ' . " " . '|' . " " . '<div id="usernamelogout"><a href="<?php echo wp_logout_url( get_permalink() ); ?>">Logout</a></div>';
- 04-06-2018, 10:00:44Selam, bu kodları functions.php ekleyebilir misiniz?
add_action('wp_logout','auto_redirect_after_logout'); function auto_redirect_after_logout(){ $actual_link = (isset($_SERVER['HTTPS']) ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; wp_redirect($actual_link); exit(); } - 04-06-2018, 14:56:18truser adlı üyeden alıntı: mesajı görüntüle
ekledim yalnız çalışmadı önce wp-login.php'e sayfasına yönleniyor aşağıdaki şekilde;
çıkışa bastığınızda daAlıntı
AlıntıAlıntı