?php /** * Template Name: Catagory * * The business page template displays your posts with a "business"-style * content slider at the top. * * @package WooFramework * @subpackage Template */ $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' ) ) )); ?>