Title: Upcoming future posts problem
Last modified: August 19, 2016

---

# Upcoming future posts problem

 *  [tades](https://wordpress.org/support/users/tades/)
 * (@tades)
 * [17 years, 6 months ago](https://wordpress.org/support/topic/upcoming-future-posts-problem/)
 * I have a Events Page where i show future Posts
 * This is the code:
 *     ```
       <?php query_posts("cat=3&monthnum=$current_month&order=ASC&post_status=future"); ?>
       ```
   
 * Once i’m on the Category page (cat=3) and i click on the permalink post these
   are not displayed at least i get logged in and this is the message
    error:
 * “Sorry, no posts matched your criteria.”
 * My category “Events Page”
 *     ```
       <?php get_header(); ?>
       <div id="wrapper">
       	<div id="content">
   
       		<?php if (have_posts()) : ?>
   
       		<?php query_posts("cat=3&monthnum=$current_month&order=ASC&post_status=future"); ?>
   
       		 <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
       <?php /* If this is a category archive */ if (is_category()) { ?>
       		<h2 class="pagetitle">Archive for the '<?php echo single_cat_title(); ?>' Category</h2>
   
        	  <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
       		<h2 class="pagetitle">Archive for <?php the_time('F jS, Y'); ?></h2>
   
       	 <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
       		<h2 class="pagetitle">Archive for <?php the_time('F, Y'); ?></h2>
   
       		<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
       		<h2 class="pagetitle">Archive for <?php the_time('Y'); ?></h2>
   
       	  <?php /* If this is a search */ } elseif (is_search()) { ?>
       		<h2 class="pagetitle">Search Results</h2>
   
       	  <?php /* If this is an author archive */ } elseif (is_author()) { ?>
       		<h2 class="pagetitle">Author Archive</h2>
   
       		<?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
       		<h2 class="pagetitle">Blog Archives</h2>
   
       		<?php } ?>
   
       		<div class="navigation">
       			<div class="alignleft"><?php next_posts_link('&laquo; Previous Entries') ?></div>
       			<div class="alignright"><?php previous_posts_link('Next Entries &raquo;') ?></div>
       		</div>
   
       		<?php while (have_posts()) : the_post(); ?>
       		<div class="post">
       				<h3 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h3>
       				<small><?php the_time('l, F jS, Y') ?></small>
   
       				<div class="entry">
       					<?php the_excerpt() ?>
       				</div>
   
       				<p class="postmetadata">Posted in <?php the_category(', ') ?> <strong>|</strong> <?php edit_post_link('Edit','','<strong>|</strong>'); ?>  <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?>
   
       			</div>
   
       		<?php endwhile; ?>
   
       		<div class="navigation">
       			<div class="alignleft"><?php next_posts_link('&laquo; Previous Entries') ?></div>
       			<div class="alignright"><?php previous_posts_link('Next Entries &raquo;') ?></div>
       		</div>
   
       	<?php else : ?>
   
       		<h2 class="center">Not Found</h2>
       		<?php include (TEMPLATEPATH . '/searchform.php'); ?>
   
       	<?php endif; ?>
   
       	</div>
   
       <?php get_sidebar(); ?>
       </div>
       <?php get_footer(); ?>
       ```
   
 * My single page
 *     ```
       <?php get_header(); ?>
   
       	<div id="content" class="widecolumn">
   
       	<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
   
       		<div class="navigation">
       			<div class="alignleft"><?php previous_post_link('&laquo; %link') ?></div>
       			<div class="alignright"><?php next_post_link('%link &raquo;') ?></div>
       		</div>
   
       		<div class="post" id="post-<?php the_ID(); ?>">
       			<h2><?php the_title(); ?></h2>
   
       			<div class="entry">
       				<?php the_content('<p class="serif">Read the rest of this entry &raquo;
       '); ?>
   
       				<?php wp_link_pages(array('before' => '<strong>Pages:</strong> ', 'after' => '
       ', 'next_or_number' => 'number')); ?>
       				<?php the_tags( 'Tags: ', ', ', '
       '); ?>
   
       				<p class="postmetadata alt">
       					<small>
       						This entry was posted
       						<?php /* This is commented, because it requires a little adjusting sometimes.
       							You'll need to download this plugin, and follow the instructions:
       							http://binarybonsai.com/archives/2004/08/17/time-since-plugin/ */
       							/* $entry_datetime = abs(strtotime($post->post_date) - (60*120)); echo time_since($entry_datetime); echo ' ago'; */ ?>
       						on <?php the_time('l, F jS, Y') ?> at <?php the_time() ?>
       						and is filed under <?php the_category(', ') ?>.
       						You can follow any responses to this entry through the <?php post_comments_feed_link('RSS 2.0'); ?> feed.
   
       						<?php if (('open' == $post-> comment_status) && ('open' == $post->ping_status)) {
       							// Both Comments and Pings are open ?>
       							You can <a href="#respond">leave a response</a>, or <a href="<?php trackback_url(); ?>" rel="trackback">trackback</a> from your own site.
   
       						<?php } elseif (!('open' == $post-> comment_status) && ('open' == $post->ping_status)) {
       							// Only Pings are Open ?>
       							Responses are currently closed, but you can <a href="<?php trackback_url(); ?> " rel="trackback">trackback</a> from your own site.
   
       						<?php } elseif (('open' == $post-> comment_status) && !('open' == $post->ping_status)) {
       							// Comments are open, Pings are not ?>
       							You can skip to the end and leave a response. Pinging is currently not allowed.
   
       						<?php } elseif (!('open' == $post-> comment_status) && !('open' == $post->ping_status)) {
       							// Neither Comments, nor Pings are open ?>
       							Both comments and pings are currently closed.
   
       						<?php } edit_post_link('Edit this entry','','.'); ?>
   
       					</small>
   
       			</div>
       		</div>
   
       	<?php comments_template(); ?>
   
       	<?php endwhile; else: ?>
   
       		Sorry, no posts matched your criteria.
   
       <?php endif; ?>
   
       	</div>
   
       <?php get_footer(); ?>
       ```
   

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [tades](https://wordpress.org/support/users/tades/)
 * (@tades)
 * [17 years, 6 months ago](https://wordpress.org/support/topic/upcoming-future-posts-problem/#post-902109)
 * I found it, the solution is here
 *  Thread Starter [tades](https://wordpress.org/support/users/tades/)
 * (@tades)
 * [17 years, 6 months ago](https://wordpress.org/support/topic/upcoming-future-posts-problem/#post-902110)
 * [http://wordpress.org/support/topic/141099?replies=2](http://wordpress.org/support/topic/141099?replies=2)

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Upcoming future posts problem’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 1 participant
 * Last reply from: [tades](https://wordpress.org/support/users/tades/)
 * Last activity: [17 years, 6 months ago](https://wordpress.org/support/topic/upcoming-future-posts-problem/#post-902110)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
