Created
August 22, 2018 01:09
-
-
Save kLOsk/5e8bf779dd26d0f2067b6d3a4fe2e5d3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Test Redirect for Naver Search Engine | |
*/ | |
function gogoes_redirect_naver() { | |
$user_agent = $_SERVER['HTTP_USER_AGENT']; | |
if(strpos( $user_agent, 'Yeti') !== false) { | |
wp_redirect( pll_home_url('kr'), 301 ); | |
//header('Location: ' . pll_home_url('kr'), true, 301); | |
exit; | |
} | |
} | |
add_action( 'get_header', 'gogoes_redirect_naver', 15 ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment