All posts show no matter which one chosen
-
I’ve messed something up in my theme so that when I try to chose one post to view, all are chosen. Limiting the posts displayed to only one (query=1) doesn’t solve the problem as only the top post will display no matter which one is chosen. My website is: https://www.fullscalearchitecture.com/press. The poorly written index code is below:
<?php get_header(); ?> <div id="wrap"> <?php include(TEMPLATEPATH."/left.php");?> <?php get_sidebar(); ?> <div id="content"> <?php if (have_posts()) :?> <?php $postCount=0; ?> <?php while (have_posts()) : the_post();?> <?php $postCount++;?> <?php if (get_post_meta($post->ID, 'header image', true)) { ?> <img src="<?php echo get_post_meta($post->ID, 'header image', true); ?>" /> <?php } else { ?> <?php } ?> <?php if (is_home()) { ?> <h2 class="entrytitle"><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2> <h3 class="entrydate"><?php the_time('F jS, Y') ?>, By <?php the_author() ?></h3> <?php } elseif (is_single()) { ?> <h2 class="entrytitle"><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2> <h3 class="entrydate"><?php the_time('F jS, Y') ?>, By <?php the_author() ?></h3> <?php } elseif (is_page('about')) { ?> <?php } else { ?> <h2 class="entrytitle"><?php the_title(); ?></h2> <?php } ?> <?php the_content('Read More »'); ?> <?php endwhile; ?> <div class="navigation"> <div class="nextposts"><?php next_posts_link('[OLDER]') ?></div> <div class="previousposts"><?php previous_posts_link('[NEWER]') ?></div> </div> <?php else : ?> <div class="not_found"> Not found. Sorry but we don't see any items with that subject. </div> <?php endif; ?> </div> <?php include(TEMPLATEPATH."/right.php");?> <?php get_footer(); ?>
- The topic ‘All posts show no matter which one chosen’ is closed to new replies.