WordPress.org

Ready to get started?Download WordPress

Forums

Showing Posts On a Category Page (8 posts)

  1. rogerklotz
    Member
    Posted 4 years ago #

    Right now my wordpress blog has a list of categories on the right side of the page. When I click on any of those categories, it brings me to a page that lists all the posts associated to that specific category.

    For example, when I click the category ABC, it goes to a page that reads:

    "Archive for the 'ABC' Category"

    Underneath that is a list of the posts with the title, date, and number of comments, but it doesn't actually show the content and pictures.

    Is it possible for the ENTIRE post to show up, instead of just showing the title when I click on a category?

  2. Jonathan Dingman
    Member
    Posted 4 years ago #

    yup! Edit your archives.php file (that's the typical file name) and change the_excerpt() to the_content() and it should show the full post then.

  3. Sure, change your archives template from the_excerpt to the_content :)

  4. rogerklotz
    Member
    Posted 4 years ago #

    hey guys, thanks for the help.

    unfortunately, in my archives.php i don't see a the_excerpt(). here is the code:

    <?php get_header(); ?>
    
    <div id="content">
    
    <div id="contentmiddle">
    
    <?php if (have_posts()) : ?>
    
    <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
    <?php /* If this is a category archive */ if (is_category()) { ?>
    <h4 class="pagetitle">Archive for the '<?php echo single_cat_title(); ?>' Category</h4>
    
    <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
    <h4 class="pagetitle">Archive for <?php the_time('F jS, Y'); ?></h4>
    
    <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
    <h4 class="pagetitle">Archive for <?php the_time('F, Y'); ?></h4>
    
    <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
    <h4 class="pagetitle">Archive for <?php the_time('Y'); ?></h4>
    
    <?php /* If this is a search */ } elseif (is_search()) { ?>
    <h4 class="pagetitle">Search Results</h4>
    
    <?php /* If this is an author archive */ } elseif (is_author()) { ?>
    <h4 class="pagetitle">Author Archive</h4>
    
    <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
    <h4 class="pagetitle">Blog Archives</h4>
    
    <?php } ?>
    <?php while (have_posts()) : the_post(); ?>
    
    	<div class="contenttitle">
    <br />
    <h6 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">• <?php the_title(); ?></a></h6><?php comments_popup_link('No Comments ', '1 Comment ', '% Comments '); ?>
    <small><?php the_time('F jS, Y') ?></small><br /><br />
    
    		</div>
    
    		<!--
    		<?php trackback_rdf(); ?>
    		-->
    
    		<?php endwhile; else: ?>
    
    		<p><?php _e('Sorry, no posts matched your criteria.'); ?></p><?php endif; ?>
    		<p><?php posts_nav_link(' — ', __('&larr; Previous Page'), __('Next Page &rarr;')); ?></p>
    	</div>
    
    <?php include(TEMPLATEPATH."/r_sidebar.php");?>
    
    </div>
    
    <!-- The main column ends  -->
    
    <?php get_footer(); ?>
  5. <h6 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">• <?php the_title(); ?></a></h6><?php comments_popup_link('No Comments ', '1 Comment ', '% Comments '); ?>
    <small><?php the_time('F jS, Y') ?></small><br /><br />

    In there, below the </h6> you can put in <?php the_content(); ?> and that should do it.

  6. rogerklotz
    Member
    Posted 4 years ago #

    ^Awesome! That did the trick.

    I've noticed another issue has come up. Hopefully you can provide information.

    When I click on a category, the very first post in that category page does not show the date (but it does show the title, # of comments, and content) and the very last post on the category page only shows the date but not the title, # of comments, or content. Everything in between these 2 posts show all the information I want to be shown (title, # of comments, and date).

    Any thoughts?

  7. That's odd. Link?

  8. rogerklotz
    Member
    Posted 4 years ago #

    ^can i email or message you the link? i don't really wanna post it here.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags