I'm using the JSON plugin from Devotee to write a small API for a third-party.

Another developer (honestly) has added a 'start_date' custom field for when a particular offer is valid from. The 'entry_date' field is defaulting to the date the entry is added.

Is there a way of doing something similar to 'show_future_entries' but with a custom field? I only want entries to be returned where the start_date is before today/current_time.

Here's my simple JSON template code:

search:product_category="Food - chilled-dairy" 

Thanks in advance,

2 Answers 2


I've struggled with this problem in the past, and there's not really a native way to fix this. There are two third-party solutions that I'm aware of that will give you an easy fix:

Low Events: http://gotolow.com/addons/low-events

Provides a wrapper for the channel-entries tag which allows you to do what you set out to do.

Solspace Date Field Filter: http://www.solspace.com/software/detail/date_field_filter/

This allows you to pick another field for date-based filtering. Different approach, for your ends same effect. This is $10 cheaper then Low's awesome module, and might be a better fit.

I'm sure there are ways to build this yourself with a custom plugin / whatever, but I'm more of a front-end kind of guy, plus: if you can fix this by spending 20 bucks and 5 minutes, to me that's always cheaper then spending an hour or two trying to work out how to fix this :). Hope this helps!

  • Steven
  • Ouch, totally forgot: I doubt you can keep using json:entries for this, but you can just use channel:entries and format your template as json. Depending on how strict the API is you can use HTTP Header to send the proper header :).
    – Steven
    Dec 3, 2012 at 13:59
  • I've used Solspace Date Field Filter and it works great for this purpose. The only limitation I have run into so far with it is that it doesn't bring all of the default behaviour of the "regular" date field with it - for example, you can't use date headings. But using it as a limiter with a static or even dynamic start or end date on the loop works just fine. Dec 3, 2012 at 14:44

The docs have an example of setting the start_on parameter dynamically. Check here

Does require a bit of php though.

  • Erwin, I had a look at the stop_before but couldn't figure out how to use it with a custom field.
    – Brett
    Dec 3, 2012 at 14:19
  • Ah sorry, hadn't noticed the custom field bit, in that case the answers above are solid options. Dec 4, 2012 at 14:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.