If you store the event start date in _event_start_date
, then you can check the value of this field against current date:
if (strtotime(get_post_meta($id, '_event_start_date', true)) > time()){
// future event
} else {
// past event
}
Related Posts:
- Make Two Views of Post Type Archive At Two URLs
- Showing only future posts in archive based on custom field date
- How to remove current year from wp_get_archives
- Archive template
- Archive list for custom post type categories
- Check if is post type archive and in category
- Not able to see CPT archive template
- Create Archive Page with Visual Composer
- Add archive/category results to single post page
- Not able to see archive page of custom posts
- Archive Custom Post Type
- Custom Post Type archive (archive-{post-type}.php) is not working
- How to display archive page posts based on author_id
- Limiting the Archive page to posts posted by particular author
- Archive-Custom-Post-Type order by Event Date, ASC, and hide events that have completed
- What code do I “comment out” to remove the loop from this Custom Taxonomy
- Group Archive list by posts tag
- Custom Post Archive – display page 1 differently then subsequent pages
- CountUp timer for custom post
- Custom Post Type Archive – archive.php is present, but it is not being used
- Custom post type archive url when post type has archive string
- get custom post archieve by month
- Customing Annual Archive plugin
- Notice- undefined variable post and trying to get property of non-object
- WordPress Rewrite Url with arugments
- How to link to an archive-special.php from a custom front-page template?
- Sort Custom Post Type Archive by Taxonomy Term [duplicate]
- Page is defaulting to archive page and not designated template
- custom post type archive page url to point to Page permalink
- Add Settings to Custom Post Type
- Custom Post Type Works but Still Shows “Page Not Found”
- I can’t set meta_key in my custom post type query
- is_post_type_archive not working in feed
- Archive page for taxonomy of custom post type
- Archive by custom post type and custom date field
- Add meta data to the custom post type ARCHIVES page
- Create Custom Post Type Archive Page with Sub Categories Navigation Sidebar
- Custom query variable – get wordpress to redirect to nice permalink url
- How do I get WordPress URL rewrites into Sitemap?
- Add custom post type archives to search results?
- Second Custom Post Type Archive
- is_main_query() not working for WP REST API
- Set up Custom-Post-Type Author Archive
- Custom post type templating problem
- Custom Taxonomy Template Error: Catchable fatal error: Object of class WP_Error could not be converted to string
- How to get all product attributes for filters in WooCommerce?
- Single post with a Custom Post Type returns 404, when archives of the CPT work correctly
- Custom post type archive page blank
- Creating a Custom Post Type
- Custom Post Type slug same as page name
- Taxonomy archive page WP_Query does not return get_the_permalink() or get_permalink() value
- Custom post type archive pagination query issue
- Use one template only for custom post type archives?
- How to set up Custom Post Type archive page as Front page
- Custom Post Type Query issue
- Polylang : Display term archive even if no posts
- Custom Permalinks For CPT and pages with parent. Advanced WordPress
- ACF for custom post type archive pages: which hook to use?
- How to display the_archive_title() and the_archive_description() – “weird” interaction
- Removed custom post type archive page shows blog page
- Custom Post Type with Configurable Sidebar via ACF
- Archive page for custom post type and custom taxonomy
- Order Custom Post Type Archive by multiple values in functions.php
- Pagination does not work on Custom Post Type archive while trying to get load more function working
- Create a Custom Path to Archive
- Custom post archive page not opening 404 page
- Archive page of CPT’s custom Taxonomy
- How can I combine WordPress default Tags and bbPress tags into one archive page?
- Getting Same Description in All the Custom Taxonomy Posts
- Archive page for WordPress Custom Post Type doesn’t show pagination from paginate_links()
- Detect Ajax call inside pre_get_posts function
- Custom post type archive URLs with a single taxonomy
- Create an array with all the links of the years’ archive (of a custom post type)
- Custom post type author issues
- ACF Pro Accessing fields on a Custom Post Type
- Do not show child pages within a file page
- Custom taxonomy with custom post type archive page
- Custome post type “tags” pick default archive instead of custom post type archive
- Create an archive page(loop) for edd products (music files) with an audio player?
- Help with Multi Level Category Archive Page
- Highlight a Post on archive page if it has a new comment?
- index.php Not Showing Custom Posts / Terms
- WordPress and Raty.js
- Pagination fault in custom post type archive page [duplicate]
- Custom Post Type Archive Links Not Working
- CPT archive as home page
- Archive page of filtered posts
- How to show all of aspecific post type that has taxonomy and a specific term
- Why is this custom post type defaulting to archive.php?
- Displaying categories items among posts
- Archive Page Pagination not working
- single-mySlug.php works: archive-mySlug.php does not. Custom Post Type
- stdClass::$labels /wp-includes/general-template.php undefined
- Add read more to the_content
- has_archive for default post type
- URL rewrites af
- Custom Post Type archive above Single Post in single.php (same author)
- Pagination for Custom Post Type with Multiple Types
- Custom Post Type Archive Title Lowercase
- Custom archive URL as a subfolder of the custom post type slug