Future posts and single.php
-
Hi guys,
I am a wordpress newbie and completely baffled. Got my archive page working nicely. However, my main event listings page displays ok (via index.php) showing only future events, but when I click the permalink the page stays on index.php and does not redirect to single.php to display the single post.
My homepage uses page.php (as I wanted to display some jquery widget on it) and I have future events listed on the page.php also. When I click the future event ‘the_permalink’ on page.php also, the page just
Not sure if my query is incorrect, or I have just not noticed something verys simple, but I have gone blind looking now and was wondering if someone could help? I have noticed that when I log in as admin, the posts display, when I log out, they do not.
index.php<div class="entries"> <?php $recent = new WP_Query("post_status=future&order=asc"); if (have_posts()) : while($recent->have_posts()) : $recent->the_post();?> <div class="entry"> <h2><a href="<?php the_permalink();?>"><?php the_title();?></a></h2> <p><?php the_date();?></p> <p><a href="<?php the_permalink();?>">Read more</a></p> </div> <?php endwhile; ?> <?php else: ?> <p>Sorry, there are currently no walks or events, but keep checking!</p> <?php endif; ?>single.php
<?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?> <h2 class="top"><?php the_title(); ?></h2> <?php the_content(); ?> <?php endwhile; ?> <?php endif; ?>
The topic ‘Future posts and single.php’ is closed to new replies.