Forums

What is wrong with my categories? It only shows one entry! (9 posts)

  1. Aimee
    Member
    Posted 3 years ago #

    OK, this has been an ongoing problem since I've converted an XHTML/CSS template into WordPress compatibility. Because on another template when I click on a category, it will show ALL the posts listed under that category.

    However, the current template I have shows only ONE post that is listed under that category. What do I need to do to fix this?

  2. chaz7979
    Member
    Posted 3 years ago #

    Can we see the code you are suing to call the categories?

  3. edsley
    Member
    Posted 3 years ago #

    You need to give more details for people to sort this problme.
    But then in the template design check the category post function and see the loop size! It might execute just once!

    Check that :)

  4. Aimee
    Member
    Posted 3 years ago #

    Example: http://www.emmafrostfiles.com/category/previews/

    Only shows one post when there are at least over 20 entries categorized under previews. The next post and previous links won't show either!

    Here's the loop I have in the category.php:
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    html post stuff here
    <?php endwhile; else: ?><?php endif; ?>

  5. chaz7979
    Member
    Posted 3 years ago #

    Looks to me like it only executes once. Suspiciously you only display one post on your homepage as well. Maybe you are reusing the same post include for both pages? I would echo out some text into that loop to see if it is even executing and if you are editing the correct file.

  6. Aimee
    Member
    Posted 3 years ago #

    Well...how do I do that?

  7. ohblue
    Member
    Posted 3 years ago #

    could you post the content of your category.php file ?

  8. Aimee
    Member
    Posted 3 years ago #

    Yes!

    <?php
    /*
    Template Name: Categories Page
    */
    ?>
    <?php get_header(); ?>
    <div id="content_wrapper">
    	<div class="main_content">
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    <div class="main_box">
    		<div class="main_box_inside">
    			<div class="main_box_content">
    				<h2><span><img src="http://www.emmafrostfiles.com/images/newspaper.png" title="<?php the_title() ?>" alt="<?php the_title() ?>"/> Latest News Item</span></h2>
    				<div class="real_content">
    				<h3><?php the_title() ?></h3>
    				<div class="date"><?php the_date() ?> at <?php the_time() ?></div>
    				<?php the_content('<img src="http://www.emmafrostfiles.com/wp-content/themes/eff_v3/images/read_more_button.gif" alt="Read More" title="Read More"/>'); ?><br />
    <div class="hr"></div>
    <small>Posted in <?php the_category(',', 'parents' ); ?> by <?php the_author_nickname(); ?> | <a href="<?php the_permalink(); ?>#respond" title="respond"><img src="http://www.emmafrostfiles.com/images/comment_add.png" alt="respond"/></a> | <img src="http://www.emmafrostfiles.com/images/comments.png" alt="comments"/> <a href="<?php comments_link(); ?>"><?php comments_number('no comments','1 comment','% comments'); ?></a> | <img src="http://www.emmafrostfiles.com/images/page_white_link.png" alt=""/> <a href="<?php the_permalink(); ?>" title="Permalink">Permalink</a></small>
    <?php previous_posts_link('Previous', '0'); ?>  <?php next_posts_link('Next', '0)'); ?>
    				</div><!--end of real_content-->
    			</div><!--end of main_box_content-->
    		</div><!--end of main_box_inside-->
    		</div><!--end of main_box-->
    	<?php endwhile; else: ?><?php endif; ?>
    </div><!--end of main_content-->
    	<?php get_sidebar(); ?>
    	<?php get_footer(); ?>
  9. Aimee
    Member
    Posted 3 years ago #

    What the heck...for months I've been trying to get help with this. And people always run away!!

    Aghhhh.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags