• Resolved adamraybicknell

    (@adamraybicknell)


    Hello,

    I have created a custom post type called ‘books’. Currently trying to use two custom fields that are both dates called:

    offer_start_date and offer_end_date

    They display perfectly on the admin panel using Admin Columns. However there was a need to filter the data, so I purchased a license for Pro.

    Having implemented this, it doesn’t actually filter the dates in the way I thought it would.

    Can you explain to me how I can get it so that when I click on “Filter”:

    1. offer_start_date … instead of being compared to it’s exact value and only bring back everything with that exact start date, can you tell me how to make it it will bring back everything with that start date and after that start date?

    2. offer_end_date … pretty much the same, but can you tell me how to bring back everything that’s ends on that date, or before it.

    Obviously, these two filter queries need to work together, thus giving me “Books” that have a offer_start_date and offer_end_date within the two specified dates in the filter

    I have had a look through the forum here and can’t find anything relate to this, or even doing this manually for a custom post type, but from that logic I feel it should be easy enough, that is however if my logic is sound, which it may not be.

    http://wordpress.org/plugins/codepress-admin-columns/

Viewing 1 replies (of 1 total)
  • Plugin Author Tobias Schutter

    (@tschutter)

    Filtering as off now will only filter matching values. So in your case you would only be able to filter the exact date. It does not support the option to filter a range, something like with dates and prices and such.

    So I am sorry to disappoint but for now the add-on does not support this feature. I do like the idea of faceted filtering so I will add your suggestion to our list of features for another look.

Viewing 1 replies (of 1 total)
  • The topic ‘Filter Custom Post Types By Date Range (Two Custom Date Fields)’ is closed to new replies.