Затык в том, что события самого календаря идут отдельной таксономией вне потока вывода query_posts() и никак не связаны с остальными постами, не знаю как можно было бы b[ совместить.можно воспользоваться крючком
pre_get_posts
add_action('pre_get_posts', 'get_posts_search_filter');
function get_posts_search_filter( $query ){
if ( ! is_admin() && $query->is_main_query() && $query->is_search ) {
$query->set('post_type', array('post', 'movie') );
}
}
add_action('wpcf7_before_send_mail', 'dco_wpcf7_before_send_mail');
function dco_wpcf7_before_send_mail($contact_form) {
$submission = WPCF7_Submission::get_instance();
$data = & $submission->get_posted_data();
$subject = $data['your-subject'];
if ($subject == 'Директор') {
$mail = $contact_form->prop('mail');
$mail['recipient'] = 'director@domain.com';
$contact_form->set_properties(array('mail' => $mail));
}
if($subject == 'Менеджер') {
$mail = $contact_form->prop('mail');
$mail['recipient'] = 'manager@domain.com';
$contact_form->set_properties(array('mail' => $mail));
}
}
<div class="videoWrapper">
<div id="player"></div>
</div>
<script>
var player;
function onYouTubeIframeAPIReady() {
player = new YT.Player('player', {
playerVars: {
autoplay: 1,
controls: 0,
showinfo: 0,
autohide: 1,
modestbranding: 1,
vq: 'hd1080'},
videoId: 'VGz0eoTSNZ8',
events: {
onReady: onPlayerReady,
onStateChange: function(event){
if (event.data == YT.PlayerState.ENDED) {
player.playVideo();
}
}
}
});
}
function onPlayerReady(event) {
player.mute();
}
</script>