Title: Future Post
Last modified: August 22, 2016

---

# Future Post

 *  Resolved [jimf81](https://wordpress.org/support/users/jimf81/)
 * (@jimf81)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/future-post-3/)
 * Hi
 * I need to add an additional query to essential grid plugin to show events that
   are in the future. I can get it all working in ascending order but don’t know
   the query I need to add to stop showing old events.
 * I have tried the following but not really up to speed on wp queries frankly
 * $query = new WP_Query( ‘_event_start_date=is_future’ );
 * Many thanks, the plugin is working very nicely otherwise.
 * [https://wordpress.org/plugins/events-manager/](https://wordpress.org/plugins/events-manager/)

Viewing 10 replies - 1 through 10 (of 10 total)

 *  [caimin_nwl](https://wordpress.org/support/users/caimin_nwl/)
 * (@caimin_nwl)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/future-post-3/#post-5762575)
 * Hi,
 * Just to clarify: Are you using an Events Manager shortcode to display the events,
   or a custom WP Query?
 *  Thread Starter [jimf81](https://wordpress.org/support/users/jimf81/)
 * (@jimf81)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/future-post-3/#post-5762577)
 * The essential grid can show the events by date order ascending, figured that 
   bit out so I don’t have to write a query for that, however I need the specific
   query in addition to what essential grid (its auto written a query I guess behind
   the scenes) is doing to show only events that are happening on a given day or
   in the future.
 * I’m almost there but I’m rubbish with queries. Essential grid calls it an additional
   parameter, therefore I need a query for this process please?
 *  [caimin_nwl](https://wordpress.org/support/users/caimin_nwl/)
 * (@caimin_nwl)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/future-post-3/#post-5762614)
 * Do you need it for a specific date or for any date in the future?
 *  Thread Starter [jimf81](https://wordpress.org/support/users/jimf81/)
 * (@jimf81)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/future-post-3/#post-5762637)
 * So I have an events page and that page should not show events that have already
   occurred.
 * So events that occur today and all those in the future, that’s the query I need.
 *  [chrissy264](https://wordpress.org/support/users/chrissy264/)
 * (@chrissy264)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/future-post-3/#post-5762733)
 * Hello jimf8! I am looking for the same solution. I am showing Events Manager 
   events using Essential Grid plugin. I have an additional category “Featured Events”
   created within Events Manager. I can select this category in Essential Grid, 
   but the featured events will still be shown when the event is past. So I must
   edit every event (the category) after it is over.
 * Do you have a solution now?
 * Thanks
    Chris
 *  [arobinson2](https://wordpress.org/support/users/arobinson2/)
 * (@arobinson2)
 * [11 years ago](https://wordpress.org/support/topic/future-post-3/#post-5762741)
 * Did anyone find a solution to this yet? I am also trying to find a parameter 
   query that will only shoe events today or later. Thanks
 *  [caimin_nwl](https://wordpress.org/support/users/caimin_nwl/)
 * (@caimin_nwl)
 * [11 years ago](https://wordpress.org/support/topic/future-post-3/#post-5762742)
 * You’d need to use the events_list with the scope attribute set to future:
 * [http://wp-events-plugin.com/documentation/shortcodes/](http://wp-events-plugin.com/documentation/shortcodes/)
 *  [arobinson2](https://wordpress.org/support/users/arobinson2/)
 * (@arobinson2)
 * [11 years ago](https://wordpress.org/support/topic/future-post-3/#post-5762743)
 * I am also using the Essential Grid plug-in to display the events from Event Manager.(
   as is chrissy264 and jimf81) Should I be able to enter [events_list scope=”future”]
   in the additional parameters of my grid?
 *  [caimin_nwl](https://wordpress.org/support/users/caimin_nwl/)
 * (@caimin_nwl)
 * [11 years ago](https://wordpress.org/support/topic/future-post-3/#post-5762744)
 * I’m not sure – I’m not familiar with Essential Grid – but you’d need to add the
   shortcode to the same place you define the content.
 *  Thread Starter [jimf81](https://wordpress.org/support/users/jimf81/)
 * (@jimf81)
 * [11 years ago](https://wordpress.org/support/topic/future-post-3/#post-5762745)
 * I think this is Ailsa who left a comment n my you tube video about this. I got
   some answer from the essential grid people.
 * This is what I added to the functions.php file. You need to change the grid alias
   number. In my case below I have a query for future events, on 2 grids and a query
   to stop caching (I had some issues with the grid so you may need this too). You
   may need it all or choose which bit you need.
 * add_filter(‘essgrid_query_caching’, ‘eg_disable_caching’, 10, 2);
 * function eg_disable_caching($do_cache, $grid_id){ //disable caching for the particular
   grid
    if($grid_id == 43 || $grid_id == 48 || $grid_id == 50){ //replace 1 with
   your desired grid id return false; } return true; }
 * add_filter(‘essgrid_get_posts’, ‘eg_modify_query’, 10, 2);
 * function eg_modify_query($query, $grid_id){
    if($grid_id == 43 || $grid_id ==
   48){ //replace 1 with your desired grid id $query[‘meta_query’] = array( ‘key’
   => ‘_start_ts’, ‘value’ => current_time(‘timestamp’), ‘compare’ => ‘>=’, ‘type’
   =>’numeric’ ); $query[‘meta_key’] = ‘_start_ts’; $query[‘meta_value’] = current_time(‘
   timestamp’); $query[‘meta_value_num’] = current_time(‘timestamp’); $query[‘meta_compare’]
   = ‘>=’; }
 *  if($grid_id == 50){ //replace 1 with your desired grid id
    $query[‘meta_query’]
   = array( ‘key’ => ‘_start_ts’, ‘value’ => current_time(‘timestamp’), ‘compare’
   => ‘<=’, ‘type’=>’numeric’ ); $query[‘meta_key’] = ‘_start_ts’; $query[‘meta_value’]
   = current_time(‘timestamp’); $query[‘meta_value_num’] = current_time(‘timestamp’);
   $query[‘meta_compare’] = ‘<=’; }
 *  return $query;

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Future Post’ is closed to new replies.

 * ![](https://ps.w.org/events-manager/assets/icon-256x256.png?rev=3550347)
 * [Events Manager - Calendar, Bookings, Tickets, and more!](https://wordpress.org/plugins/events-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/events-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/events-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/events-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/events-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/events-manager/reviews/)

 * 10 replies
 * 4 participants
 * Last reply from: [jimf81](https://wordpress.org/support/users/jimf81/)
 * Last activity: [11 years ago](https://wordpress.org/support/topic/future-post-3/#post-5762745)
 * Status: resolved