Do the other post have to be set to draft? Or would just showing today’s post work? If just showing today’s post works you could do something like the following
$today = getdate();
$args = array(
'category_name' => 'event',
'posts_per_page' => 5,
'year' => $today["year"],
'monthnum' => $today["mon"],
'day' => $today["mday"]
);
query_posts( $args );
Related Posts:
- Custom Post Type Archives by Year & Month?
- Set post date before 1970
- How to order posts of a custom post type by date DESC in dashboard Admin?
- WP_Query() show posts that end later than today
- Automatically fill custom field value on post publish/update
- Uploading DB to server from local is not matching the post dates
- Permalinks using event date (year & month) instead of publication date
- How to sort CPT by custom meta value (date), and return posts month by month
- Date query for a custom meta field
- wp_update_post on specific custom post type
- Custom Post Types – How to include custom fields
- How to make an archive page displaying posts in a date range
- Query current and future events, ordered by begin date
- Displaying custom posts only if custom meta box’s date is not expired
- Get the next event using date_query
- wp_update_post based function works on existing posts, but not new posts
- get_queried_object error How to show post count by month in the taxonomy page
- Updating post title using wp_update_post
- Custom Post Type Events Archive Grouped By Month
- query_posts with a custom post type, a meta_query and sorting by post date?
- How Can I Set the Post Author of a Post I Just Created With PHP?
- Insert and then update post_type by wp_update_post
- Posts are duplicating on wp_post_update
- Default sort on admin columns with meta date hides draft posts with empty date value
- WP_Query most viewed posts, in multiple Post Types, last 30 days, excluding a specific taxonomy term
- Post count by month of taxonmy term
- Meta Query posts not showing on ending date of custom field
- Use the same date-based permalink structure for all post types
- Post author for revision not being set on update/insert
- How to order posts of a custom post type by date DESC in dashboard Admin?
- Order post by date with ACF
- How to automatic update date and time when save custom post type
- Programmatically change post visibility on save_post action return a 500
- Why does wp_update_post causes white screen?
- Update post if exist from PHP
- Sort custom post type by most current date picker
- I am trying to get cutom post cout by month of current taxonmy term
- Odd behaviour for the update button when displaying a WP_List_Table
- How to display a WordPress Custom Field only on a specific day of the week?
- WordPress giving a 404 page when passing a year argument different than the current year
- Using WP meta query to show custom post types by a start and finish date
- Why does my URL keep returning 404 error code?
- How to keep a record of changes to a custom field?
- Problem with date comparison for custom fields
- Using global $post; with custom post types
- How to sort WP_Query by a custom text field (written as a date dd/mm/yyyy)
- How to set post date in post_type so that it’s same as latest post in category
- Display post count for a specific month
- Updating a custom post status after an expiry date rather than trashing it
- Compare ACF Date field to today or yesterday
- get_queried_object not work in taxonomy page
- Change the term based on the value of a $variable using wp_update_post in submitting a form
- update flamingo_inbound post type after insert
- save_post affect creation and deletion
- Want to display my custom date archive to date.php but dont know how
- Can I override the permalink/slug on creation
- Pre_get_posts comparison with custom field doesn’t work
- Display year value before a set of posts
- Custom Post save causes 500 error
- date archive future posts
- Get month and day from a Date Picker custom field
- Loop posts in a table ordered by a custom field value
- group posts by month/date ignore years
- How to get past and upcoming post by defining date in custom field?
- How to display custom post type ordered by a custom field date
- How to save an integer as taxonomy term?
- Generate daily archive whenever any post type is added
- Create a list of months based posts
- How to randomize published date for WordPress custom post type
- ACF Field to set Publish Date – Post Duplication upon Update
- Is it possible to specify a time interval (from, to) in ACF with date picker, or other custom field?
- Order Wp Query by earliest of 3 dates meta query
- WP_Query() displaying past post / event
- How to display *block number* instead *date value* on WordPress posts?
- Many CPT is conflicting of the custom date
- retrieving external api data and updating existing custom post
- Get terms by taxonomy AND post_type
- Permalink Structure for Multiple Post Type Archives by Taxonomy
- Allow user to Edit Posts but not Add New?
- WordPress 4.4+ : How to revision CPT + metadata
- Remove Custom Post Type menu for non-administrator users.
- Using Query Posts With Multiple Post Types And A Taxonomy
- Custom Taxonomy List links being re-written
- wp_list_categories and custom post types
- Bulk 301 redirect for custom post type
- Associate Taxonomies Across Post Types
- ‘category__and’ for custom taxonomy?
- Custom post type hierarchical permalinks not behaving as expected for parent/child pages
- Check if a specific custom field exists?
- Fetch ID’s associated with a custom post type when translated with WPML?
- Custom post types archive redirect
- Moving ‘register_post_type’ to seperate file not working
- Get post from custom post type order by two taxonomies
- Custom Taxonomy Archives on Custom Post type Page [duplicate]
- Override a page template from a plugin in a child theme
- Display custom fields from custom posts in RSS feed
- Versioned Custom Post Type (Not the same as revisions)
- Is it better to use WordPress Custom Post Types or Taxonomies?
- A custom post within a custom post
- TinyMCE style formats for different post types