How do I Show ALL posts for Catagories and Tags?

How can I get WordPress to ignore “Blog pages show at most” when a user clicks on a “Catagory” or “Tag” link ?

THANKS

Related posts

Leave a Reply

2 comments

  1. Try this (add to your theme’s functions.php):

    function my_unlimited_posts_list( $vars ) {
      if ( isset($vars['category_name']) || isset($vars['tag']) )
        $vars['posts_per_page'] = -1;
    
      return $vars;
    }
    add_filter( 'request', 'my_unlimited_posts_list' );
    
  2. in your category.php or archive.php (depends on your theme)
    add this before the loop:

    if (is_category() || is_tag()){
        global $query_string;
        query_posts( $query_string . "&posts_per_page=-1" );
    }