• Hello!

    I had my site running well for months until I realized the index page with my thumbnails (links to posts) seem to no longer link to the posts properly. when I click on a thumbnail, it instead shows me the same page, only with fewer thumbnails that seem connected by a category. Very strange!

    Here is the code for my index.php and single.php below

    index.php:

    <?php get_header(); ?>
    
    <div class="home fix">
      <div class="main">
        <div class="fix">
    
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <?php
       if (is_home()) {
          query_posts("cat=4");
       }
    ?>
    
      			<div class="post" id="post-<?php the_ID(); ?>">
    
    <!-- thumbnail wrapper -->
    <div class="thumb main">
    
    <!-- 235150image-covers -->
    <?php $image = get_post_meta($post->ID, 'thumbnail', true); ?>
    <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><img src="<?php echo $image; ?>" alt="" /></a>
    <!-- 235150image end -->
    
    <!-- thumbanil title -->
    <div class="thumb-title">
    <h2><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title() ?>
     <?php comments_number('[+]', '[1]', '[%]' );?></a></h2>
    </div>
    <!-- thumbanil title end -->
    
      			</div>
      			</div>
      		  <?php endwhile; ?>
    
      		  <?php else : ?>
      		  <div class="post single">
        			<h2>No matching results</h2>
        			<div class="entry">
        				<p>You seem to have found a mis-linked page or search query with no associated or related results.</p>
        			</div>
        		</div>
      		<?php endif; ?>
    
      	</div>
      </div>
    
    </div>
    
    <?php get_footer(); ?>

    And here is the code for single.php:

    <?php get_header(); ?>
    
    <div class="home fix">
      <div class="main">
        <div class="fix">
           <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
      			<div class="post single fix" id="post-<?php the_ID(); ?>">
      			  <h1><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title() ?></a></h1>
      			  <div class="postMeta">
                  <span class="date"><?php the_time('M jS, Y') ?></span>
    			  <span class="cats"><?php the_category(', ') ?></span>
                  <span class="edit"><?php edit_post_link('Edit this entry.'); ?></span>
    
                  </div>
    
    <div class="entry">
    <span class="meta-data">
    <?php
    
      $mykey_values = get_post_custom_values('Brief');
      foreach ( $mykey_values as $key => $value ) {
        echo "<strong>Brief:</strong> $value<br />";
      }
    
    ?>
    <?php
    
      $mykey_values = get_post_custom_values('Media');
      foreach ( $mykey_values as $key => $value ) {
        echo "<strong>Media:</strong> $value<br />";}
    
    ?></span>
    
    		<?php the_content('<p>Continue reading &raquo;</p>'); ?>
    	<br />
    
      		          </div>
    
      			</div>
    
    <div class="prevnext">
               <div class="left"><?php previous_post_link('%link', '&laquo; %title', FALSE); ?></div>
            <div class="right"><?php next_post_link('%link', '%title &raquo;', FALSE); ?></div></div>
    
      		<?php endwhile; else : ?>
      		<?php endif; ?>
    
      	</div>
      </div>
    
    </div>
    <div class="commentpage">
    
    <?php comments_template(); ?>
    </div>
    
    <?php get_footer(); ?>

    Any help would be greatly appreciated!

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘posts not showing; categories show instead’ is closed to new replies.