WordPress设置强制跳转登录

修改 每个主题的 header.php文件

路径一般如下:

./wordpress/wp-content/themes/blocksy/

<?php


get_currentuserinfo();

global $user_ID;

if ($user_ID == ”) { header(‘Location: /wp-login.php’);

exit();

}


?>