Support » Fixing WordPress » How do I list categories / Archives as a list of titles rather than actual posts

  • Resolved Chris777uk



    Please help a noob, Basically all I want is when people click on the categories they get a list of title names of previous posts they can click rather than the whole posts on the screen (where it only has six before you have to click “previous posts”

    hope that makes sense.

    thanks for looking


Viewing 15 replies - 1 through 15 (of 20 total)
  • i’ve tried messing with code and doing using different widgets but they all do the same thing, is that something to do with the stylesheet?

    I dont mind having to read up can someone just point me in the right direction if need be.


    Sorry if its an obvious answer but it would be great if anyone could help?

    ….. :/



    Hey Chris.

    Here’s a template for an archive.php file. This should display just the titles of the posts in a certain month. Here it is. Just upload it to /wp-content/themes/yourthemename/archive.php (not archive.php.txt). You can then modify the style of h1 #pagetitle if your stylesheet.

    However, I’m not sure of a way of displaying all posts on one page, without a manual sql query in your archives file.


    This is the code I use in my category.php, all post titles are listed alphabetically:

    <?php $posts = query_posts($query_string . '&orderby=title&order=asc&posts_per_page=-1'); while (have_posts()) : the_post(); ?>
    	<li><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></li>
    	<?php endwhile; ?>

    posts_per_page=-1 means that all posts in that category are listed.

    thank so much for taking time to reply, i dont have a category.php do i need to create one?

    If you have an archive.php in your theme, just duplicate it and name the new copy category.php.

    k thanks ill give it a go! 🙂

    cool thats a real step in the right direction, is there a way just to list all the previous posts in that category without having the dates / months?

    thanks again for your help!

    ill re-phrase that i think its listing the date of the post rather than the post title?


    It looks like you may have a plugin or residual archive code interfering. Archives by month and Archives by category should not appear due to my code.

    well im getting closer im using code for you and chris (thanks to both of you for helping)

    All i need to do now is move the sidebar to the right rather than it being underneath the posts on the left….

    is that easy to change?


    bump…last time i’ll ask a question for a while i promise! 😀

    Did you fix this? The sidebar looks to be on the right to me

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘How do I list categories / Archives as a list of titles rather than actual posts’ is closed to new replies.