Support

Account

Home Forums Front-end Issues display events will become … Reply To: display events will become …

  • ok i found alone,
    i don’t put the good key name 😉

    it’s ok like this:

    $currentdate = date(“Y-m-d”,mktime(0,0,0,date(“m”),date(“d”)-1,date(“Y”)));

    query_posts( array(
    ‘meta_query’=> array(
    array(
    ‘key’ => ‘date-picker’,
    ‘compare’ => ‘>’,
    ‘value’ => $currentdate,
    ‘type’ => ‘DATE’,
    )),
    ‘post_type’ => ‘concerts’,
    ‘meta_key’ => ‘date-picker’,
    ‘orderby’ => ‘meta_value_num’,
    ‘posts_per_page’ => 4,
    ‘order’ => ‘ASC’,
    ) );
    ?>
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    <div class=”post-photo”>
    <div class=”thumbnail opacity”>”><?php the_post_thumbnail(‘thumbnail’); ?></div>
    <p><?php the_title();?></p><br/>
    <div class=”bouton-6″>voir l’album</div>
    </div>
    <?php endwhile; ?>
    <?php endif; ?>
    <?php wp_reset_query(); ?>