停用wordpress的链接猜测功能

Function代码

// 停用wordpress的链接猜测功能,minirizhi.com
add_filter('redirect_canonical', 'stop_guessing');
function stop_guessing($url) {
if (is_404()) {
return false;
}
return $url;
}
文章目录