Forum Replies Created
-
AuthorPosts
-
SEMANTICS
ParticipantDear Nico,
I used this snipped in my functions.php file and succeeded to list all past and upcoming events on map but also all past events are being listed on the list under the map now.
So i want just like this, map will list all past and upcoming, and the list under it will show unly the upcoming ones.
here is the code i’m using.
add_action( ‘tribe_events_pre_get_posts’, ‘modify_map_query’ );
function modify_map_query( $query ) {if ( defined( ‘DOING_AJAX’ ) && DOING_AJAX && $query->get(‘eventDisplay’) == ‘map’ ) {
$query->set( ‘posts_per_page’, -1 );
$query->set( ‘start_date’, ‘1000-01-01’ );
$query->set( ‘end_date’, ‘5000-01-01’ );
}return $query;
}SEMANTICS
ParticipantNico,
Thank you very much for your helps. I will be really happy if you can do me a favor about solving that problem.
Hope to hear from you soon.
Thanks.
SEMANTICS
ParticipantDear Nico,
I inserted the snipped you gave me but nothing changed, you can see it here http://www.mineralsday.eu/events/map/
Can you please tell me what’s wrong?
SEMANTICS
Participantby the way, if you click on previous events link at the bottom of the page, it starts showing past events on map. I tried to increase events per page option to 100 but nothing changed.
-
AuthorPosts
