Try this:
$my_query = new WP_Query(array(
'post_status' => 'future',
'order' => 'DESC',
'posts_per_page' => 1,
));
while ($my_query->have_posts()) {
$my_query->the_post();
the_date();
echo ' - ';
the_title();
}
wp_reset_postdata();
or this: http://wordpress.org/extend/plugins/show-future-posts-on-single-post/
Related Posts:
- Hook for post and page load
- Change permalinks for posts but not for custom post types
- Is it proper to create a page just to generate a listing page (eg. for a custom post type)
- Custom Posts on Different Pages
- Display “Post 2 of 4” on single post page?
- Multiple Content Block
- How do I create an archive page for standard posts?
- Update content of multiple pages/posts at once?
- Making pages also serve as taxonomies? Or give full pages to taxonomies?
- Remove parent from custom post type
- Trying to edit the single page from a Custom Post
- How i can add ‘N’ page of ‘N’ pages under posts loop?
- Display only one post each WEEK
- JS innerhtml changing style when using AJAX
- How to change the post type a theme shows by default?
- No Permission to add new Page, Post or CPT with Admin role
- Including link to custom post type in ‘wp_list_pages’ function
- Multiple pages per post (not pagination)
- Can I change my post type to anything and my site still work?
- Display an authors post on a single page only when they are logged in
- WP_Query with custom post type ID
- How to set the mainpage of a custom post type?
- Render a Post or Page using the correct file
- Am I mixing up the concept of posts pages and categories?
- How to setup different permlalinks for posts and pages?
- Does “Custom Post Type” can have page hierarhy option?
- How to display custom field in product description?
- Post template not applying on theme (potentially rendering as Page template)
- How to use posts as tabs in a custom page?
- Cannot save pages after migration
- call a function when insert and update a custom post type
- Links Image in “Catalog” Page to Posts
- creating a custom post template
- WordPress Contents Migration
- Creating Slider in wordpress theme with custom post
- One Post with different content, depending on a Page
- Cannot use pages created on WP
- Different post types arranged on one page
- erase post excerpt limitation [×]
- How to display data with pagaination on backend?
- How to Associate Posts with Pages
- Why are my wp urls showing page not found?
- How do I hide single category post on my post page
- Adding a new custom post type using the editor causes 502 bad gateway error
- How Can I Set the Post Author of a Post I Just Created With PHP?
- How do I fix permalinks for custom post types that has the same slug as a page?
- Custom post type and body_class: Remove “blog” class
- WordPress Orderby Numeric Value Not Working
- ACF simple text field value not showing
- Exclude child pages from archive.php
- is there a way to retrieve posts that do not have a featured image assigned?
- Auto-generated posts not showing in backend (but being counted!)
- Shortcode for display posts on home page show only one post
- Deleting Custom Post type data using mySQL command
- How to Get Current Custom Post Type Selected Taxonomy Term (Not All Terms)
- Find the user who initially created the post
- Made Custom Post Types, but single.php not working
- Is it possible to place custom post type files inside a folder in theme directory?
- Need help targeting a custom post type with conditional tags
- How to get the post type from a category id?
- Displaying a custom post types custom taxonomy value?
- Notice: Undefined index: suppress_filters
- How to Separate CPT From Regular Posts?
- Create custom PAGE with register_post_type
- Remove rows in the manage post/page view
- Should I use custom menu, C.P.T. or theme options, or something else for this?
- Is there a way to have the view link on manage posts page to open in a new window or tab?
- Should I use custom taxonomy or custom post type
- Disable featured image
- How to create custom boxes with text inside?
- How to add post_type=value when editing that post type in the WordPress admin?
- Adding dropdown select meta box to custom post type – seems restAPI is interfering
- Open Custom Post Type as PDF
- Using The REST API How To Pull All Custom Posts?
- Making a custom help center page
- What’s the difference between same wp functions get_posts(); functions in different form?
- One-to-many post relationships that are displayed by category (using posts-to-posts plugin)
- create a template page for a post
- Show the same Article Available in Other Categories
- Getting posts under the custom post type ui category
- What template files do I need to customise custom-category-term-links rather than fall back on archive.php?
- Page vs Custom Post Types Differences/Issues
- Storing posts from query and accessing later via AJAX call
- If post has custom field then display css-class
- page.php showing loop of posts and not page content
- List children on child post
- Restrict custom post type from appearing with ?post_types=
- Show custom post type filtered by category
- create parent post using wp_insert_post
- Turn on and off custom post type from admin?
- Missing Posts in Custom Taxonomy List
- Get term name and term parent into custom post type permalink
- Display random posts, but omit the post it is on?
- How do I do this with WordPress? Taxonomies?
- Disable block with taxonomies at post page
- I would like to have different styles for my posts based on the content of each post
- How can i add thumbnails images to particular post (using code not admin pannel) in wordpress
- Showing posts from different categories and from custom post type
- Get latest 3 posts from multiple CPT in one query
- Which post does a taxonomy term belongs to?