Help Desk

'Today' link clears Filter Bar Filters

  • Posts: 12 Topics: 8
    | Permalink

    I’m having an issue where clicking the ‘Today’ link clears the filter bar filters. Here is the code i’m using for my today link:

    <li class="cell small-8 tribe-events-nav-today bdc-nav-today"><a href="<?php echo Tribe__Events__Main::instance()->getLink( 'month' ) ?>">Today</a></li>

    Should i be generating this link in a different way? Maybe i have the wrong function?

    Posts: 11242
    | Permalink

    Hi. I see the “Today” link in the middle above your calendar at http://avalon.dance/events/

    The link you generate with your code is as expected, since it’s a direct link to Month View, not taking into consideration the existing URL query string.

    It might help to pair what you have with https://stackoverflow.com/questions/8469767/get-url-query-string or some other way to incorporate the URL query string.

    Please let me know how this goes for you.

    Posts: 12 Topics: 8
    | Permalink

    So just to confirm/clarify @cliff, it is default behavior for the “today” link to clear/reset the Filterbar filters when installed with Events Calendar Pro? I was hoping that using the “today” link would be smart enough to know that filters are applied (like the previous and next month buttons).

    Posts: 11242
    | Permalink

    Your “Today” link is a link you generated with your own code. And your code simply links to the Month View regardless of where the user currently is (i.e. their currently-applied filters).

    Please let me know if this isn’t clear.

    Posts: 12 Topics: 8
    | Permalink

    Sorry, yes. That’s clear. I guess I was asking, is there another “official” way to accomplish this functionality that I missed in the documentation? One that would better support the Filterbar.

    Posts: 11242
    | Permalink

    There isn’t an “official” way to accomplish this functionality. I hope you’re able to figure it out. Please let me know how this goes for you.

    Posts: 65
    | Permalink

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

    | Permalink