add_action( ‘wp_footer’, ‘mycustom_wp_footer’ );
function mycustom_wp_footer() {
if(is_page(“public”)){
?>
<script type=”text/javascript”>
document.addEventListener( ‘wpcf7mailsent’, function( event ){
location = ‘/thank-you/’;
}, false );
</script>
<?php } else if(is_page(“publicen”)){ ?>
<script type=”text/javascript”>
document.addEventListener( ‘wpcf7mailsent’, function( event ){
location = ‘/thank-you-en/’;
}, false );
</script>
<?php
}
}
4 条评论
评论已关闭。