Date Filter Using ACF

Forums › Forums › Search & Filter Pro › Date Filter Using ACF

Tagged: , ,

Viewing 5 posts – 1 through 5 (of 5 total)
  • Anonymous
    #252068

    Hi, I have posts for simple events that are aligned to our collection points. I want to show where we have events by the date and availability. We rehome hens and want to show when there are hens available at a certain collection point.

    I can filter on that using a taxonomy field OK (Hens Available) and this shows the posts where we have hens available.

    What I also want to do is filter by date. From this page, https://holly.undermywing.org.uk/test-rehoming-points/ we have events in Cheshire in August and Devon in July, but entering the July dates in the date fields doesn’t filter out the Devon post – nothing is shown.

    Can you tell me where I’m going wrong? I should have set up the ACF connection OK and I’ve set the dates as YYYYMMDD, though it would be good to actually display them in a different format – ideally dd mmm yyyy.

    Also, is there a way to preset a date filter? It would be great to have a button or checkbox to ‘Show hens available this month’ and ‘Show hens available next month’ – is that possible?

    Thanks!

    Trevor
    #252110

    The meta key you have sued is wrong. You have used:

    _next_rehoming_date

    Look further down the list for next_rehoming_date (without the preceding underscore).

    The preset date filters may become possible in V3, due in a few months.

    Anonymous
    #252155

    Thanks Trevor – works fine now!

    I’ve also got the date format as I want – I set it to display and return as
    ‘July 9, 2020 F j, Y’ in ACF which I didn’t think would work, but the S&F Date Input Format is set for ACF YYYYMMDD with display set to ’09/07/2020′, so I’d have thought these wouldn’t tie up, but so far so good.

    Trevor
    #252157

    Great. Is it OK to close this thread for now?

    Anonymous
    #252159

    Yes – thanks again.

Viewing 5 posts – 1 through 5 (of 5 total)
Search & Filter Support
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

We also use cookies to store items in your cart as well as allowing your to login on the site.

You can adjust all of your cookie settings by navigating the tabs on the left hand side.

By continuing to use this site, you also agree to our Privacy Policy.