Date range picker for ACF field

Forums › Forums › Search & Filter Pro › Date range picker for ACF field

Tagged: , ,

Viewing 4 posts – 1 through 4 (of 4 total)
  • Anonymous
    #229221

    Hi,
    I correctly set the ACF field date format to Ymd which stores dates in yyyymmdd format in meta_value.

    I added the field in posts fields but, by searching using the date picker, search results are empty. Of course I rebuilt the cache.

    Trevor
    #229239
    This reply has been marked as private.
    Anonymous
    #229319

    Sorry, before that. Is there a way to dump the query S&F is performing?

    Trevor
    #229325

    Our plugin send a list of matching ID’s to the WordPress database, having worked out which posts match the criteria, the the actual final query may not be of much use. It will send a query to our cache tables though. Query Monitor plugin should show you that. To get a breakdown of the actual filters in use, this code (you need to change the ID in this code – 1234 – to that of your form) will dump the array to the screen:

    <?php
    global $searchandfilter;
    $sf_current_query = $searchandfilter->get(1234)->current_query()->get_array();
    echo '<pre>',print_r($sf_current_query,true),'</pre>';
    ?>
Viewing 4 posts – 1 through 4 (of 4 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.