Forums Forums Search & Filter Pro Ordering by ACF date field not working

Viewing 10 posts - 1 through 10 (of 10 total)
  • Anonymous
    #265670

    Hey people, me again.

    An earlier project’s back on track, with some modifications asked by the client. There’s a list of CPT which is possible to filter by taxonomies and it now should be ordered by an ACF date field.

    I’ve set the order to be meta_value, ascending, and marked the field as a date field. What am I missing here? 🤔

    Ordering

    Some things I think that could affect this: date is set to dd/mm/yyyy and the field (data-encerramento) is inside a group (encerramento)

    Thank you!

    Trevor
    #265675

    The date format will be the issue. They need to be stored in YYYMMDD format.

    Anonymous
    #265857
    This reply has been marked as private.
    Trevor
    #266023
    This reply has been marked as private.
    Anonymous
    #266203

    Ok, with final content all items will have the final date field filled, I’ll insert random dates to test this then.

    Do you believe this would solve this issue? I’ll test this later and return.

    Can you please try to login again with the same credentials?

    Trevor
    #266219

    At least one post has an incorrectly formatted date, as you can see here:

    https://www.screencast.com/t/b4i9omO8lr1S

    I do not know which one.

    You might also try sorting as a number.

    Anonymous
    #266449

    Trevor, I’ve set it to number and reinserted the entries on local development and now it is fully working.

    I’m wondering how to get to this section on screenshot.

    Thanks for your attention!

    Trevor
    #266569

    What do you need to show me? Or is it fully working right now?

    You can do screenshots and upload the images to a file sharing site (like the WordPress Cloudup site, or many other sites like it) and share the links for them with me.

    Anonymous
    #266575

    Trevor, I was talking about your screenshot, how can I get to this debug box?

    Everything is working now, thanks.

    Trevor
    #266579

    Ah. Go to the field in the form. If the field is not in the form, add a Post Meta to the form (temporarily, no need to save). Select the Choice option at the top, then select the date field’s meta key name. You will see an option below to select field values Automatically or Manually, set it to Manual. Then hit the browse button to see all the values that our plugin finds for that key in the database. Unfortunately, it does not tell you which posts have which values, or how many posts have each value.

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