I would store as a custom field, like you say as a timestamp or ISO 8601 (YYYY-MM-DD). That way you can leverage WP_Query’s Custom Field Parameters for queries within your theme files.
For instance:
// Get posts where the custom field is less than the current time
$foo = new WP_Query(array(
// other query vars...
'meta_query' => array(
array(
'key' => 'date_custom_field',
'value' => time(),
'compare' => '<'
)
)
));
Related Posts:
- Paginated Taxonomy Term Archive including one post per term
- wp_query to find posts by year and month
- wp_query check if integer exists in custom field’s array
- WordPress loop: Show only a Custom Post Type Taxononmy TERM
- First custom field value (out of several) displayed twice after query
- How to get_term_meta on single custom post?
- How to display posttypes and taxonomy in standard posts, not in a separate label?
- ACF – Retrieve custom taxonomy from a relationship field
- Display Custom Field or Custom Taxonomy in front page /post/product
- tax_query showing no results
- WP_Query not using relation key as expected and not producing any results
- $wpdb: Counting posts corresponding to 3 terms in 3 different taxonomies
- Including Custom Meta with posts_where query
- Pagination : How to remove /page/x/ after a ‘POST’ action on a form returning to page 1
- Display CPT posts based on specific taxonomy
- shortcode to show custom post types by category
- WP_Query: include custom post type only with specific meta value
- WP_Query orderby modified to include custom meta changes
- WordPress custom loop filter by meta_key and value with serialize data
- Returning a list of custom post types excluding those without a specific meta_value
- Query/list all terms and their custom post count
- How to bulk copy custom fields between custom posts?
- Filtering WP_Query Dynamically on the Front-End
- Why get_posts() not returning only selected category posts from Custom Post Type?
- Two near-identical custom field types – one works, the other doesn’t . What can cause this?
- Retrieve value of a category’s custom field
- Archive for custom taxonomy lists all posts instead of current taxonomy
- Genesis filterable portfolio isotope [closed]
- Get posts by querying taxonomy and certain terms of the taxonomy?
- Custom post type templating problem
- Wrong request query on cpt and tax
- Get custom taxonomies from multiple posts
- Pagination for Custom Taxonomy Page [duplicate]
- Search / Filter posts on Title/Content OR Tags
- Custom Post Type Taxonomy Filters
- WP_Query most viewed posts, in multiple Post Types, last 30 days, excluding a specific taxonomy term
- Custom-Posttype & Custom Taxonomy WP_Query
- Custom loop with multiple taxonomy queries
- Return one unique custom post type result when it shares a custom taxonomy in WP_QUERY?
- search also in taxonomy, tags and custom fields
- How do I associate a custom post type with another through a taxonomy or storing an ID in a custom field?
- How can I get the number of custom post type posts that have a specific attachment image set?
- Problem querying Custom post type by custom fields
- Orderby CPT custom fields not working
- Custom taxonomy rewrite give pagination 404
- WP_Query order by custom field, then randomly order some of results
- WP_Query inside foreach loop returning same value for all options when filtered using ajax
- Show custom post type relationships by taxonomy
- Query custom post type with ACF Date
- Custom WP Query on custom meta and sort by multiple meta keys value
- Including metaboxes from custom post types in global search — continued
- How can I made custom taxonomies relationship?
- Query Multiple Custom Posts by Custom Fields
- What’s the WP way to load remaining custom posts?
- Dynamic dropdown select values depending on other custom field value
- Custom taxonomies relationship
- Get Posts by multiple custom fields is not working
- Order Custom Post Type by Custom Field Value
- How to conditionally redirect to the post from a taxonomy page?
- How to have this permalink structure: post_type/postname/custom_inner_page
- Query Custom Post Type Taxonomy term with multiple parameters
- Hierarchy and access control for Custom Post Types (CPT)
- Add Custom Post Type of specific Custom Taxonomy to regularly blog loop
- How to group posts and get a mixed posts and groups view?
- WP_Query orderby and tax_query
- Possible to filter custom post type with multiple meta data?
- How to display products name in a non-alphabetical order, in a custom field (taxonomy)?
- can these 3 queries be re-written as 1 query?
- Advanced search form with filters for custom taxonomies
- Show fields based on taxonomy selection in editor
- Permalinks: custom structure for taxonomy – tags?
- Query based on custom fields start and end date
- Why is my WP_Query outputting my entries twice?
- How to display Related Posts based on number of taxonomy terms matched
- Retrieve custom post types by custom taxonomies with WP_Query
- WP the_posts() on single-cars.php get category link
- tax_query not working in template
- Custom Taxonomy Not Showing in Front-End When Outputting a Custom Post Type with WP_Query()
- DIsplaying URL of custom field in last post of certain taxonomy && post type
- How to make WP_Query not to show irrelevant posts?
- Custom post type’s extra fields – how to handle?
- WordPress wp_query() basic question about args
- WP Query ‘posts_per_page’
- Create an archive page for custom post type with custom taxonomy
- Display post from a date range from custom field
- Creating custom post type with custom taxonomy and custom fields programatically
- Using page slug in wp_query
- WP_Query() with custom post type and taxonomy — get all terms?
- post_per_page ignored in WP_Query
- Custom taxonomy wp_query woes.
- Variable not working in WP_Query
- WP_query – Filter by tax_query and meta_query using multiple select
- Creating two loops based on different logic
- Wp Query with multiple custom tag(taxonomy) by get the terms
- How to get specific post meta by title or id
- How to list tags from custom post type attachments?
- Targeting categories in custom fields
- Custom post type, custom taxonomy, query posts only from taxonomy (children of)
- WP_Query parameter conflict
- Custom taxonomies to define versions of a product