How to show all the blog posts in each category?

Discussion in 'WordPress' started by stock_post, Dec 12, 2009.

  1. #1
    Say you have 8 or 9 categories.
    if user click on the category, I like to show the Posts in that category.

    so, they can pick the article they want to read!

    any help is appreciated.

    Thanks
     
    stock_post, Dec 12, 2009 IP
  2. bob25

    bob25 Well-Known Member

    Messages:
    1,519
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    128
    #2
    You can try going to Settings/Reading and changing Blog pages show at most to a different number. I don't know if there's a maximum number though.
     
    bob25, Dec 12, 2009 IP
  3. AlohaThemes.com

    AlohaThemes.com Active Member

    Messages:
    128
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    83
    #3
    Here is what you are looking for. The key is to execute a query before the instance of the loop. Like this, where the category ID =3, and it is showing 100 posts:

    <?php query_posts('cat=3&showposts=100&order=ASC');?>
    <?php while(have_posts()) : the_post(); ?>
    <h3 id="post-<?php the_ID(); ?>"><?php the_title(); ?></h3>
    <div class="resize">
    <?php the_content(); ?></div>
    <?php endwhile; ?>

    HTH :)

    - Scott
     
    AlohaThemes.com, Dec 13, 2009 IP
  4. stock_post

    stock_post Prominent Member

    Messages:
    5,213
    Likes Received:
    249
    Best Answers:
    0
    Trophy Points:
    310
    #4
    I did this and it is better than what I had.


    Scott: I would like to know on what file I add this?
     
    stock_post, Dec 13, 2009 IP
  5. theapparatus

    theapparatus Peon

    Messages:
    2,925
    Likes Received:
    119
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I'm a bit lost here. Most themes do this out of the box with out issue. Care to tell us what's occurring now and what you;re seeing?
     
    theapparatus, Dec 13, 2009 IP
  6. AlohaThemes.com

    AlohaThemes.com Active Member

    Messages:
    128
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    83
    #6
    Any page you want to display your posts within - this could literally be any page. If you are unsure, check out the WP template hierarchy flow chart. This should be very helpful in determining the page you need to edit:

    http://codex.wordpress.org/images/thumb/1/18/Template_Hierarchy.png/600px-Template_Hierarchy.png

    Best - Scott
     
    AlohaThemes.com, Dec 13, 2009 IP