Commit e54565b2 authored by Kevin Cristiano's avatar Kevin Cristiano 🌎

Update tc-eo-feed-limit.php

parent a1cacf8e
<?php
/*
Plugin Name: Event Organiser Feed Limit
Plugin URI: https://develop.tadpole.cc/plugins/tc-eo-feed-limit
Description: Limit Event feed to Future Events
Author: Christian Wach
Author URI: http://haystack.co.uk/
Version: 1.0
License: GPLv2
*/
add_action( 'pre_get_posts', 'tc_eventorganiser_pre_get_posts', 20 );
function tc_eventorganiser_pre_get_posts( $query ) {
if ( $query->is_feed( 'eo-events' ) ) {
// Do not show past events.
$query->set( 'showpastevents', false );
$query->set( 'event_start_after', 'now' );
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment