title: wordpress -override number of posts in loop
body: <p>See: <a href="http://jasondaydesign.com/portfolio" rel="nofollow">http://jasondaydesign.com/portfolio</a></p>
  
  <p>Also, for this custom loop, how would I override the number of posts as set by WP Settings > Reading > show 10 posts.</p>
  
  <p>thanks!</p>
  
  <pre><code>&lt;?php
  /*
  Template Name: Portfolio
  */
  ?&gt;
  
  &lt;?php get_header(); ?&gt;
  
  &lt;ul id="portfolio-filter"&gt;
    &lt;li&gt;&lt;a href="#all"&gt;All&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="#web-design"&gt;Web&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="#logo-and-branding-design"&gt;Logo&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="#print-and-graphic-design"&gt;Print&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="#sculpture"&gt;Sculpture &lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="#for-sale"&gt;For Sale &lt;/a&gt;&lt;/li&gt;
   &lt;/ul&gt;
  
          &lt;ul id="portfolio-list"&gt;
          &lt;?php query_posts('cat=5&amp;showposts='); ?&gt;
          &lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&gt;
  
  &lt;!-- ** store the category slugs for each post in a variable $catSlug ** --&gt;
    &lt;li class="&lt;?php foreach((get_the_category()) as $category ) { echo $category-&gt;category_nicename . ' '; } ?&gt;all"&gt;
  
   &lt;!-- ** This is my own plugin to get the thumbnail from the post - you may use some custom field you have to get the image. ** --&gt;
                      &lt;a href='&lt;?php the_permalink() ?&gt;' title='&lt;?php the_title(); ?&gt;'&gt;&lt;img src='&lt;?php woo_image('width='.$woo_options['woo_thumb_w'].'&amp;height='.$woo_options['woo_thumb_h'].'&amp;class=thumbnail '.$woo_options['woo_thumb_align']); ?&gt;' alt='&lt;?php the_title(); ?&gt;' /&gt;&lt;/a&gt;
  
                      &lt;p&gt;&lt;?php the_title(); ?&gt;&lt;/p&gt;
       &lt;p&gt;&lt;?php the_excerpt(); ?&gt;&lt;/p&gt;
  
                  &lt;/li&gt;
              &lt;? endwhile; ?&gt;
          &lt;? endif; ?&gt;
    &lt;?php wp_reset_query(); ?&gt;
          &lt;/ul&gt;
  
  &lt;?php get_footer(); ?&gt;
  </code></pre>