How Do I Get A Wordpress Category Archive Page To Show Multiple Post Excerpts?

2 replies
I need help in tweaking my Wordpress theme, please.


The result I want to achieve is:


After someone clicks on a category that is listed on the category sidebar widget, I want the category archive page to then display a listing of excerpts of posts in that category so that the visitor can then select the information most relevant to the purpose of their visit.


Ideally, I envision there being 10 or 12 excerpts (or all of the posts in that category, if I choose...?), and I want each of the excerpts to include the title of the post, under the post title a text excerpt consisting of something like 60 words or so (a nice tight paragraph) from that post.


And, if possible, at the end of the excerpt I'd like there to be a hyperlink they can click so they can read more (the text of the hyperlink could say "read more")


Can you please advise on the PHP tweak(s) to achieve this?


Thank you very much!


David
#archive #category #excerpts #multiple #page #post #show #wordpress
  • Profile picture of the author singh1720
    Reference for getting A Wordpress Category Archive Page To Show Multiple Post Excerpts
    dailyblogtips.com/use-post-excerpts-everywhere/
    durofy.com/internet-2/how-where-to-show-post-excerpts-on-your-wordpress-blog/
    pagelines.com/wiki/How_to_Use_the_Blog_and_Posts_Settings
    icode4you.net/wordpress-manually-control-which-blog-pages-show-excerpts-and-which-show-full-posts
    {{ DiscussionBoard.errors[6137585].message }}
  • Profile picture of the author Ashera
    David, it honestly depends on the theme. I usually end up running a loop to the archive.php from category.php to output the posts and use something similar to this:

    <div id="content" role="main">

    <?php
    printf('<h1 i[/QUOTE]d ="category-title-%s" class="page-title category-title">',strtolower(str_replace(' ','-',single_cat_title( '', false )))); echo("\n");
    printf( __( 'Category Archives: %s'), '<span>' . single_cat_title( '', false ) . '</span></h1>' );

    $category_description = category_description();
    if ( ! empty( $category_description ) )
    echo '<div class="archive-meta">' . $category_description . '</div>';

    /* Here's where you run the loop for the category page to output the posts.
    */
    get_template_part( 'loop', 'category' );
    ?>

    </div><!-- #content -->
    Signature
    If you don't change direction, you'll end up where you're going.
    {{ DiscussionBoard.errors[6137670].message }}

Trending Topics