For Future Posts, you can just have Published Posts that are scheduled for the future. When editing a post, you can click on Edit beside “Publish Immediately” and select a date/time.
You can then have a subloop get all posts with the post_status of future. That should work just fine for you!
Future:
$query = new WP_Query( array(
'post_status' => 'future',
'orderby' => 'date',
'order' => 'ASC',
'posts_per_page' => 1
) );
if( $query->have_posts() ) {
while( $query->have_posts() ) {
$query->the_post();
echo the_title();
}
}
Oldest
$query = new WP_Query( array(
'orderby' => 'date',
'order' => 'ASC',
'posts_per_page' => 1
) );
if( $query->have_posts() ) {
while( $query->have_posts() ) {
$query->the_post();
echo the_title();
}
}
Related Posts:
- functions.php conditional tag only for custom post type
- Is it possible to use array_walk() to append terms to an array of posts?
- Redirect to URL if x number of days passed
- $_SESSION Not working after X amount of page views
- How to I add count of custom posts listed in a post as a prefix to its title
- Can’t edit custom post type
- Register widget only page is a singular of custom post type
- Is there a conditional tag to determine whether the post is _any_ custom post type?
- Conditional Query of Custom Post Type and custom taxonomy
- Set URL link to featured image of custom post type
- Change CPT archive title
- AJAX load more for different custom post type loops
- PHP variable not regenerating when publishing multiple posts at the same time
- On update or create post redirect to current post position in list
- I need to add endpoint for wordpress categories
- How to target a specific custom post type post and its all children and grandchildren?
- Featured image overlay when changing post status
- get_post_meta not working on publishing
- Redirect 404 page with ID in slug to associated page with same ID in slug
- WordPress wrapped added a span tag to every single p tag
- Stuck in Order by more then one
- ACF field key/value to show on taxonomy list
- Re-registering a custom post type not working (not showing up)
- Display featured image from one CPT within another CPT query
- Query taxonomy of taxonomy of custom post type
- Best way to style first post differently?
- How to make custom posts types display when published for the future
- Query Multiple Custom Posts by Custom Fields
- How to rewrite url for any specific taxonomy?
- create a new page from a custom post type similar to an authors page
- CPT archive admin menu label
- Anon function and add_meta_box
- Hide a widget inside a div on specific type of post
- Shortcode not working with post counter
- Changing default ‘posts’ parameters with register_post_type_args
- Multiple (two) category postings on the same page.
- Homepage’s content is dependent on the custom field values (set automatically), how do I get homepage to update without manually updating page?
- Cannot save CPT meta box
- ‘exclude’ argument is not working with get_posts for a custom post type
- How to get the intersection of two terms both from different custom taxonomies
- Display latest x posts from all categories in Custom Post Type/Taxonomy
- Allow users to create posts without logging in?
- How to change permalink to include custom post type
- How to run filter only on custom post type edit screen
- Configuring a meta query with multiple post types that have the same relationship on a single page
- Conditional statement for if archive page has posts which contain certain taxonomies/categories/tags, show those terms
- Custom Post Conditional for Parent & Child Single.php?
- Add term to custom post type on draft
- How to assign classes to all elements?
- next_/previous_post_link() `in_same_category` appears to fail when true
- Want to be able to sign up subscribers as authors
- Load scripts based on post type
- Different Category system needed for the Custom Post Type
- Global custom meta box
- Template not working for the custom Post type
- Warning: Invalid argument supplied for foreach() [closed]
- Custom post type isn’t working
- Conditional for a Single Post That Belongs to a Category?
- Meta-Boxes for CustomPostType cause PHP Errors and Notices in “Add New” view
- categories should be available across all custom post types
- Warning: Invalid argument supplied for foreach() in post.php [closed]
- Featured Image field not appearing in Custom post type
- Reworking function for counting custom post type posts count
- How to show only the most recent post on my custom post type archive?
- Get only used meta_values
- Post-thumbnail only for specific post-types?
- custom post type metaboxes not saving
- Custom Post Type & Custom Menu Walker to append custom class for active post types
- Number of posts in the archive
- Custom query for custom post_type
- Enable taxonomies by post type in an array of CPTs
- Recoverable Fatal Error – Object of class WP_Post could not be converted to string
- PHP question: how to combine syntax?
- Loop increase number
- custom post for slider
- ACF in wordpress
- Conditional Tags for specific category of custom posts
- Change Slug of a Custom Post Type
- Excerpt function for any content
- Assign category a default post type
- Navigate posts with different post type that are in the same categories
- List of all entries of custom-post-type: Add year-parameter?
- Move Genesis Single Page/Single Post Title
- Add an Outside Wrapper to my Header and Make it Full Width
- Page Template Dropdown For Custom Post Types
- Showing custom post type categories in the menu
- How to use a variable as a function name?
- populate array with posts
- How to Make infinite loop of post
- How to check if post/page or taxonomy post is published by admin
- Show Custom Message in WordPress Admin
- get_posts seems to be skipping the last Post
- TinyMCE Buttons on Certain Post Type
- Displaying multiple post types on home page
- Conflict between wp_list_pages and get_posts – list pages not displaying
- How to inherit field value from parent post into in child / sub post
- How exclude or skip post type with get_next_post_link
- Prevent A Specific Custom Post Type Showing In WP Search Results Page
- Display message if no posts in Custom Post Type loop
- Return number of all custom posts type by author in all statuses