-1
작업을 사용하여 사이트 상단에 바를 표시합니다.
나는 is_customize_preview()
을 사용하고 사용자 정의 프로그램의 URL에있는 바 ID를 가져 와서 아무것도 반환하지 않습니다.
다음은 내 코드입니다 :
add_action('wp_footer', 'jws_ob_content');
function jws_ob_content() {
if(is_customize_preview()) {
$offer = get_post($_GET['offer_id']);
$offer_custom = get_post_custom($_GET['offer_id']);
echo "<pre>";
print_r($_GET['offer_id']);
exit();
}
else {
$offer = get_post('505');
$offer_custom = get_post_custom('505');
}
}
is_customize_preview() 메소드는 어떤 기능을합니까? – Peon
is_customize_preview()가 사용자 정의 프로그램이면 true를 반환합니다. –
'print_r ($ _REQUEST);를 확인 하시겠습니까? – C2486