Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $time= "12:00:00";
- $day= "20180705";
- $args = array(
- 'numberposts' => -1,
- 'post_type' => 'spectacles',
- 'post_status' => 'any',
- 'meta_query' => array(
- 'relation' => 'AND',
- array('key' => 'evenement_%_date_debut_evenement','compare' => '=','value' => $day),
- array('key' => 'evenement_%_heure_debut_evenement','compare' => '=','value' => $time),
- )
- );?>
- <?php $the_query = new WP_Query( $args );?>
- <?php if( $the_query->have_posts() ): ?><?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
- <?php if (have_rows('evenement')) {while (have_rows('evenement')) {the_row();?>
- <?php if (get_sub_field('heure_debut_evenement', false) == $time && get_sub_field('date_debut_evenement', false) == $day ) { ?>
- <div><?php echo $time ;?> > <?php the_sub_field('heure_fin_evenement'); ?>
- <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a> • <?php if( get_field('compagnie') ): ?><?php the_field('compagnie'); ?> • <?php endif;?><?php $post_object = get_sub_field('lieu_evenement');if( $post_object ):?>
- <?php $post = $post_object; setup_postdata( $post ); the_title();?>
- <?php wp_reset_postdata();?><?php endif;?></div><?php }}}?>
- <?php endwhile; ?><?php endif;?>
- <?php wp_reset_query(); ?>
- <!-- 12:30:00 -->
- <?php
- $time= "12:30:00";
- $day= "20180705";
- $args = array(
- 'numberposts' => -1,
- 'post_type' => 'spectacles',
- 'post_status' => 'any',
- 'meta_query' => array(
- 'relation' => 'AND',
- array('key' => 'evenement_%_date_debut_evenement','compare' => '=','value' => $day),
- array('key' => 'evenement_%_heure_debut_evenement','compare' => '=','value' => $time),
- )
- );?>
- <?php $the_query = new WP_Query( $args );?>
- <?php if( $the_query->have_posts() ): ?><?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
- <?php if (have_rows('evenement')) {while (have_rows('evenement')) {the_row();?>
- <?php if (get_sub_field('heure_debut_evenement', false) == $time && get_sub_field('date_debut_evenement', false) == $day ) { ?>
- <div><?php echo $time ;?> > <?php the_sub_field('heure_fin_evenement'); ?>
- <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a> • <?php if( get_field('compagnie') ): ?><?php the_field('compagnie'); ?> • <?php endif;?><?php $post_object = get_sub_field('lieu_evenement');if( $post_object ):?>
- <?php $post = $post_object; setup_postdata( $post ); the_title();?>
- <?php wp_reset_postdata();?><?php endif;?></div><?php }}}?>
- <?php endwhile; ?><?php endif;?>
- <?php wp_reset_query(); ?>
Add Comment
Please, Sign In to add comment