title: Wordpress - Show preview of all but current post in sidebar widget
body: <p>i have 4 posts belonging to "news" category. I've added a this code in single.php to show the title of other posts in the same category in the sidebar.</p>
  
  <pre><code>&lt;?php
      $query = "showposts=10&amp;orderby=rand&amp;cat=";      
      foreach((get_the_category()) as $category) { 
      $query .= $category-&gt;cat_ID .","; 
      }       
      query_posts($query);
  ?&gt;
  &lt;ul class="related grid_5"&gt;
      &lt;?php while (have_posts()) : the_post(); ?&gt;
          &lt;li&gt;&lt;?php the_title() ?&gt;&lt;/li&gt;
       &lt;?php endwhile; ?&gt;      
  &lt;/ul&gt;
  </code></pre>
  
  <p>using this i can retrieve all posts in the same category and display them and all 4 titles belonging to "news" are displayed in the widget. but I'm on post#3 how can show only #1, #2, and #4 titles in the widget?</p>