Support Forums

The forums are closed and will be removed when we launch our new site.

Looking for support? You can access the support system via your account.

Forums Forums Search & Filter Pro Show Events based on Post Meta

Tagged: ,

Viewing 6 posts - 1 through 6 (of 6 total)
  • Daniel Coats
    #10907

    I would like to show events (custom post type) based on a custom field called wpcf-event-date, so that only future events are displayed. I have tried using the ‘Post Meta’ tab under ‘Settings and Defaults,’ however that doesn’t seem to be working. Based on others’ support requests, I suspect the issue is that the wpcf-event-date meta values are being stored in UNIX time, not YYYYMMDD format.

    Do you have any suggestions as to how I can solve this issue without modifying the post meta values stored in the database?

    Thank you!

    Ross Moderator
    #10935

    Hey Daniel

    Unfortunately the post meta date only works as YYYYMMDD however lucky for you I believe the unix timestamp is the best way to store this info – I’ll look at adding it to the plugin over the next week or so.

    *edit – however, when you use a post meta field in your search form, you are able to choose if the saved format is timestamp or YYYYMMDD

    Thanks

    Daniel Coats
    #10976

    Thank you Ross! Looking forward to the update.

    Ross Moderator
    #12347

    Hey Daniel

    Just looking to implement this but I’ve hit a logic snag…

    If I was going to compare to the current date, as a timestamp, what time in the day should that timestamp be? Or should it not be the current date, but the current time, as in the timestamp of right now?

    I think this would be the best option, so I could add another option the in the dropdown called timestamp, under say date, where the user could enter the timestamp manually or tick “current date and time”.

    What do you think?

    Daniel Coats
    #12364

    Good question, and yes, I agree that it should be based on the current time, as you suggest, as that method is more precise than picking a particular time of day.

    Thank you again for the plugin. The design is really intuitive, and it works superbly.

    Daniel

    Ross Moderator
    #12880

    Hey Daniel

    About to update the plugin and this has been added in.

    Just something to note – the comparisons are done against unix timestamps – not JS timestamps which includes the milliseconds (3 digits longer).

    Thanks

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

The forum ‘Search & Filter Pro’ is closed to new topics and replies.