SEMANTICS

Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • in reply to: Show both past and future event pins on map view #1013635
    SEMANTICS
    Participant

    Dear 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;
    }

    in reply to: Show both past and future event pins on map view #1013606
    SEMANTICS
    Participant

    Nico,

    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.

    in reply to: Show both past and future event pins on map view #1013027
    SEMANTICS
    Participant

    Dear 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?

    in reply to: Show both past and future event pins on map view #1012649
    SEMANTICS
    Participant

    by 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.

Viewing 4 posts - 1 through 4 (of 4 total)