는 어떻게 다른 사용자 정의 페이지로 wp-admin
에서 사용자를 리디렉션 할 수있는 또 다른 URL로 WP - 관리자를 리디렉션 할 수 있습니다 이어떻게 예를 들어 나는이 URL을 리디렉션 할,
wp_redirect(home_url('/custom/'));
exit();
는 어떻게 다른 사용자 정의 페이지로 wp-admin
에서 사용자를 리디렉션 할 수있는 또 다른 URL로 WP - 관리자를 리디렉션 할 수 있습니다 이어떻게 예를 들어 나는이 URL을 리디렉션 할,
wp_redirect(home_url('/custom/'));
exit();
wp_redirect($location, $status);
exit;
또는 시도 0 가장 쉬운 방법은 webroot directory
에 .htaccess
파일을 만드는 것입니다.
이후 그것에이 쓰기
Redirect /wp-admin http://www.example.com/custom
상당히 자기 설명한다. 두 번째 링크 http://www.example.com/custom
에 첫 번째 링크 /wp-admin
에서 Redirect
또 다른 방법은 아마 워드 프레스를 wp_redirect()
기능 같은 것을 사용하는 것입니다 :
wp_redirect('http://example.com/custom', $status);
'wp_redirect ('http://example.com/custom', $ status); '를 어디에 두어야합니까? – Resolution
@wes-login.php 안에 @Resolution – Xatenev
를 사용하여 다른 리디렉션하여 functions.php 파일에 다음 코드 URL.
function redirect_login_page(){
// Store for checking if this page equals wp-login.php
$page_viewed = basename($_SERVER['REQUEST_URI']);
// Where we want them to go
$login_page = http://example.com/custom; //Write your site URL here.
// Two things happen here, we make sure we are on the login page
// and we also make sure that the request isn't coming from a form
// this ensures that our scripts & users can still log in and out.
if($page_viewed == "wp-login.php" && $_SERVER['REQUEST_METHOD'] == 'GET') {
// And away they go...
wp_redirect($login_page);
exit();
}
}
add_action('init','redirect_login_page');
이 코드는 어디에 두어야합니까? – Resolution
답변 됨 편집 됨 .. –
이 코드는 어디에 배치해야합니까? – Resolution