0
只允許來賓的登錄名和密碼重置頁面
我目前使用下述溶液中我functions.php文件,迫使那些沒有登錄訪問者這樣做:WordPress的
// force visitors to log in to see the page
function admin_redirect() {
if (!is_user_logged_in()) {
wp_redirect(home_url('wp-admin'));
exit;
}
}
add_action('get_header', 'admin_redirect');
但現在我面臨的問題是,沒有人可以重置密碼,因爲它們被重定向到/ wp-admin /。
如何排除URL/my-account/lost-password /?
預先感謝您!