Problem:
I have a custom post type called "Tax Sales" with a custom field called "Tax Sales Date" (it's a date field). I would like to query all posts from that custom post type with a tax sale date that is older than today and from the current year.
Solution:
You can follow WP document to setup your custom PHP codes:
https://developer.wordpress.org/reference/classes/wp_query/#custom-field-post-meta-parameters
For example:
https://toolset.com/forums/topic/query-cpt-with-date-older-than-today/#post-2228581
Relevant Documentation:
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | - |
- | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | - |
Supporter timezone: Asia/Hong_Kong (GMT+08:00)
This topic contains 3 replies, has 2 voices.
Last updated by 2 years, 12 months ago.
Assisted by: Luo Yang.