• Hi,

    Ive recently constructed a wordpress site but i have a problem when i click on a category the posts from that category are not showing up, just a blank page shows?

    I have installed a theme called holiday wordpress and was wondering whether this could be a theme problem or an occuring problem with 2.7?

    Any help would be greatly appreciated.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter spicer

    (@spicer)

    Ive looked in my themes folder and seen that there is no category.php file anywhere….could this be a problem?

    Thread Starter spicer

    (@spicer)

    Ok…ive changed my theme to various other themes and the posts do show under the correct category page so i believe it seems to be my current theme which is stopping the category pages from showing any posts.

    Ive read that when there is no category.php the template reverts back to the index.php file and i believe this is where the problem is…

    This is my current index.php code:

    <?php get_header() ?>
    
      <div id="featured">
      	<?php include(TEMPLATEPATH . '/includes/featured.php'); ?>
      </div>
    
    	<div id="main-top"> </div>
      <div id="main">
        <div id="maincontent">
            <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    				<?php if($counter==1){
    				  $counter++;
    				} else { ?>
    					<div class="postwrapper clearfix">
    						<div class="bubble"><?php comments_popup_link('0', '1', '%'); ?></div>
    						<h1 class="post"><a id="post-<?php the_ID(); ?>" href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a> <?php edit_post_link('Edit'); ?></h1>
    						<div class="posted">Posted on <span><?php the_time('l, F j, Y'); ?></span> in <span><?php the_category(', ') ?></span></div>
    						<?php the_content('Continue Reading'); ?>
    
    						<?php if (function_exists('the_tags')) { ?>
    					  	<?php the_tags('<div class="tags">Tags: ', ', ', '</div>'); ?>
    						<?php } ?>
    						</div>
    				<?php $counter++; } ?>
    
    		<?php endwhile; ?>
    
    		<?php else : ?>
    			<h1>Not Found</h1>
    			<p>Sorry, but you are looking for something that isn't here.</p>
    			<?php include (TEMPLATEPATH . "/searchform.php"); ?>
    			<div class="postmeta"></div>
    		<?php endif; ?>
    			<div class="clearboth"></div>
    			<div class="navigation">
    				<div class="alignleft"><?php next_posts_link('&laquo; Previous Posts') ?></div>
    				<div class="alignright"><?php previous_posts_link('Next Posts &raquo;') ?></div>
    			</div>
        </div>
    
    	<?php get_sidebar() ?>
        <div class="clearboth"></div>
      </div>
    
    <?php get_footer() ?>

    Is anyone able to see if there is something in that code stopping my posts from showing on their respective category pages?

    Thread Starter spicer

    (@spicer)

    Does anyone know the query code i need to put into the file if i create a category.php?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Categories not showing posts?’ is closed to new replies.