Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $pTitle = get_the_title();
- $today = date('Y-m-d');
- query_posts(array('tribe_events_cat' => $pTitle,
- 'showposts' => 5,
- 'post_type' => 'tribe_events',
- 'meta_key' => '_EventEndDate',
- 'orderby' => 'meta_value',
- 'order' => 'ASC',
- 'meta_query' => array(
- array(
- 'key' => '_EventEndDate',
- 'meta-value' => $value,
- 'value' => $today,
- 'compare' => '>=',
- 'type' => 'CHAR'
- )
- )
- ));
- ?>
- <ul>
- <?php while (have_posts()) : the_post(); ?>
- <li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li>
- <?php endwhile; ?>
- </ul>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement