Support » Fixing WordPress » How to show all posts in a category page?

  • hi all, i’ve configured only certain categories of posts to appear on my index.php. now, i want to also have a specific page to show ALL my posts (not index.php, because i’ve uses for that already)

    is there a snippet of code to show ALL posts in perhaps a ‘page’ or category page? i tried to do the_loop using runPHP but it doesnt seem to work.

    can anybody point me in the right direction? thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • You don’t need any “special code” for that.
    WP does it out of the box: it uses archive.php to display the monthly or category archives <– this one is the listing of all posts from a certain category. By clicking on a category name you should be able to see all the posts in that category.

    If you want some fancy different look, you can use the Category_Templates.
    ALso, to understand how the template files are used in WP, see Template_Hierarchy.

    hi moshu, thanks for replying. =)

    i understand that category.php can do that. i’ve already implemented category to help me handle showing all posts within a category..

    however i’m still not too sure about showing all posts (all categories) .. how am i going to modify the code for it, and how am i going to decide what page url to show it under?

    http://codex.wordpress.org/Template_Tags/query_posts

    Place something like this before your loop:

    <?php query_posts('category_name=Cat Name&showposts=999'); ?>

    Hope that helps!

    And also post the URI of that site so we can avoid it – I’d hate to open a webpage with 999 posts on it 🙂

    Why not use the prev/next posts links?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to show all posts in a category page?’ is closed to new replies.