📅  最后修改于: 2022-03-11 14:53:50.242000             🧑  作者: Mango
function redirect_direct_access( ) {
$post_id = get_the_ID();
if ( $post_id == POST_ID && !isset( $_GET[ 'voluumdata' ] ) ) {
wp_redirect( 'REDIRECT_URL' );
exit();
}
}
add_action( 'template_redirect', 'redirect_direct_access' );