Skip Navigation

[Resolved] Search Filter from URL parameter not setting

This thread is resolved. Here is a description of the problem and solution.

Problem:

The issue here is that the user wanted to do a parametric search but only for future posts.

Solution:

To do this you will need to add a query filter for the date field that you wish to use to display the future posts.
More info and a screenshot can be seen here https://toolset.com/forums/topic/search-filter-from-url-parameter-not-setting/#post-621397

This support ticket is created 6 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 4 replies, has 2 voices.

Last updated by Shane 6 years, 10 months ago.

Assisted by: Shane.

Author
Posts
#620085

I am trying to:
Create a constant View of "Past Events",
There is a taxonomy for Event Year (2018, 2017, etc).
I want to show only Past Events, so I made a filter for Event Date (custom field) that is being filled with URL parameter.
It works well when I don't choose any Taxonomy (Year).

But when I click the year "2018", it removes the "Event Date" filter, instead of adding it to the search criteria.

Link to a page where the issue can be seen:
hidden link)

(Choose 2018 after loading)

I expected to see:
Both filters being added.

Instead, I got:
Only Taxonomy (Year) filter is being chosen, which causes to show future events (when choosing 2018).

#620153

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Hila,

Thank you for contacting our support forum.

So your view is essentially only being filtered by one parameter ?

Would you mind allowing me to have admin access to the website so that I can take a look at this for you ?

The private fields will be enabled for your next response.

Thanks,
Shane

#620556

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Hila,

Thank you for the credentials.

I checked this and it seems fine to me. The filters work fine.

Thanks,
Shane

#621395

It's not,
Choose 2018 in Past Events,
And you could see it still shows future events (not considering the Event To filter).

#621397

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Screen Shot 2018-03-02 at 9.08.01 AM.png

Hi Hila,

Thanks for pointing me in the right direct.

I see you were passing the query in the URL but this was not necessary as our views filter has a Today() function in built. Take a look at the screenshot.

I've set a static filter so that all your 2018 events will always result in a day that is already in the past.

Please let me know if this helps.
Thanks,
Shane