[Resolved] How can I filter posts by custom field expiration date?
This support ticket is created 7 years, 6 months ago. There's a good chance that you are reading advice that it now obsolete.
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.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
You can make a custom WordPress Archive (at Toolset > WordPress Archives) for your custom post type, add a Query Filter to test the value of your custom field, then design the output in the Loop Output section.
The problem is that I'm not using views on many sites for clients because I've had to go back in and correct issues where the client goes in and toys around with the views unknowingly.
Is it possible to do this query my self through wordpress filters within the arguments i pass to the query loop?
I'm looking into meta_query and comparing meta_value and meta_key but for whatever reason, the date is not working.
I'll take a look at this after lunch, but it leapt out at me that you are mixing underscores and hyphens in your custom field slug, check the meta_key in your latest post.
Sorry, I was just testing using underscore before I made the post, I changed it back to just hyphens. That was my mistake.
Oddly enough, if I create my own custom meta box without the use of WP Types where I input the date through a simple text field. This works as expected :/
As a footnote, are you familiar with Toolset Embedded? You can create sites with Toolset but ship the site with read-only versions of the Toolset plugins so your clients can't change and break things.
I had figured it out once I seen it was stored in unix timestamp value within the database.
I appreciate you taking the time to look into this. Such a pain sometimes and it ends up being an easy solution! DOH!
I didn't know about embedded toolset. I will need to check that out. I'm a lifetime member here and love the tools and support that is provided. You guys do an amazing job.
Again, thanks for the help!
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.