Filtering using event dates

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Filtering using event dates

This topic contains 17 replies, has 2 voices, and was last updated by

 
Keymaster
2 years, 2 months ago.

Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts
  • #24380

    Participant

    I was wondering if you could give me advice on setting up a filter to search through event dates. I have created a custom post called Whats-on which have event dates. Some dates or single dates “21 October 2019” and some dates are dates from “21 October 2019 – 25 October 2019”

    What would be the best approach to do this? Which events plugin would you recommend? I installed The Events Calendar plugin but I can’t get the filter to work, keeps saying no results.

    #24388

    Hi,

    I am not sure if The Events calendar plugin supports adding date fields to custom post types. I can recommend that plugin and the Events Manager plugin, but you may need to ask the authors of those if they support adding date custom fields to your custom post type.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #24389

    Participant

    Could you point me to the correct Events Manager plugin you mean? Is it this one https://wp-eventmanager.com/?

    #24393

    Sure! It’s this one: https://hu.wordpress.org/plugins/events-manager/

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #24396

    Participant

    Thank you.

    1 more question, is there a way to date filter by current week and by current month? If it is a Thursday and I have a checkbox to search by current week, could it search till Sunday?

    #24398

    Hi,

    Unfortunately no, that is not possible. As far as I know the dates are stored within a single date field, and the plugin can only compare the values from a datepicker against that.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #24565

    Participant

    Hi Ernest,

    I’m having trouble with filtering dates using a start and end date.

    I created a custom post type for events (whats on) and 2 custom fields with Advanced custom fields, start date (whats_on_date_start_date) and end date (whats_on_date_end_date)

    The filter I created works great when the start and end date are the same. Example the event date is 14th November 2019 – start date 14th November / end date 14th November. But some events last more than 1 day – Example 1st November to 30th November. The custom field doesn’t pick these up.

    Could you tell me what the issue might be and if this is possible?

    Thank you

    Attachments:
    You must be logged in to view attached files.
    #24577

    Hi!

    Well, it should work, based on your description, if everything is set up correctly. The from-date filter there seems to be okay, so I suspect the other one is the problem.

    Make sure that the correct custom field, and the correct operator is selected. (‘..before the date (to date) inclusive’) – if the operator is set incorrectly, that would explain the issue perfectly, as it will still show the one day events.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #24580

    Participant
    You cannot access this content.
    #24582
    You cannot access this content. Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #24583

    Participant
    You cannot access this content.
    #24584

    Participant
    You cannot access this content.
    #24587

    Thank you, that is working now, not sure what the issue was.

    I just re-read your previous comment. I see the issue now. You have:
    – Event set as: 12 September 2019 till 9th feb 2020
    – Filter set as: 1st november 2019 till 20th november 2019

    That will not match of course, since 1st Nov. is > 12 Sept, same for the end thate. The filter is basically saying “show me events that start after 1st Nov and end before 20th november” – and none of that match that event. The event is basically out of the interval

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #24588

    Participant

    Hi Ernest,

    Is this not possible to do then?
    Do you know a solution?

    I guess you understand what I am trying to achieve here. That event does fall on November so I was hoping it would show.

    #24589

    Hi,

    I am not sure what exactly you are looking for, maybe the reverse of the filter operators?
    Because this right now works correctly, it does exactly what it should. If you flip the operators for the start/end dates, then it will show basically all ongoing events.
    ..or you can change the filed logic to OR, and then it will show events that either start after the date, or end before the date.
    I recommend experimenting with these, one configuration will give you the expected results, I am sure.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 15 posts - 1 through 15 (of 18 total)

You must be logged in to reply to this topic.