Support » Fixing WordPress » need help with category pages

  • I’m making a news site at http://www.thenewscrave.com and I want when the user clicks on any given category, it lists all the posts (title only) from that category instead of just going to the most recent story and having a ‘next post’ link on the bottom. can anyone give me some pointers? 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • bump.. can anyone help? 🙁

    I have this in my category.php to show all post titles in a category in alphabetical order:

    <ul>
    <?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; ?>
    </ul>

    ahh thanks. i put it in and it seemed to work, but created some other problems. once i put it in the category.php page, it shows all the post titles at the top, but then shows all the posts in their entirety undernearth the titles. any way to make it so its only the titles showing?

    You need to replace the loop that’s already in there. I’d recommend that you backup your category.php before doing this.

    http://codex.wordpress.org/The_Loop

    thanks iridiax :). greatly appreciated.

    one last question, in the code u sent me, it seems like it can only show a maximum number of 5 posts in the lists, no matter how much higher i raise the number in posts_per_page=-1. any ideas?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘need help with category pages’ is closed to new replies.