title: Magento 1.7.0.0 FishPig - Excluding Category
body: <p><strong>EDIT 01-28-13: Revised to clarify my question.</strong></p>
  
  <p>I'm using Magento 1.7.0.0 and FishPig WP full integration. We have successfully listed products from specific category and from all categories but was wondering if we can exclude in some cases from specified category. I found solutions to do this in functions.php within WordPress but this does not seem to work.</p>
  
  <p>Here is the current code that displays posts from all categories. We'd like to add an exception so WordPress 1 Category can be excluded.</p>
  
  <p><strong>Here is the code that displays from all categories which I'd like to NOT include category "Press_HomePage":</strong></p>
  
  <pre><code>    $col_posts = Mage::getResourceModel('wordpress/post_collection')-&gt;addIsPublishedFilter();
      $posttotal = count($col_posts-&gt;getAllIds());
      $posttotid = $col_posts-&gt;getAllIds();
  
      //i&lt;=2 means displays last 2 posts
      //display latest 2 posts...
      for ( $i=1; $i&lt;=2; $i++ )
        {
    ?&gt;
          &lt;div class="blog"&gt;
            &lt;h2&gt;&lt;?php echo $col_posts-&gt;getItemById($posttotid[$posttotal-$i])-&gt;getPostDate(); ?&gt;&lt;/h2&gt;
            &lt;h1&gt;&lt;?php echo $col_posts-&gt;getItemById($posttotid[$posttotal-$i])-&gt;getPostTitle(); ?&gt;&lt;/h1&gt;
            &lt;div style="float:left; margin-top:15px; margin-bottom:25px;"&gt;
            &lt;?php 
              $featured_img = $this-&gt;getSkinUrl('images/pree_emty.png');
              if($featuredImage = $col_posts-&gt;getItemById($posttotid[$posttotal-$i])-&gt;getFeaturedImage())
                {
                  $featured_img = $featuredImage-&gt;getAvailableImage();
                }
            ?&gt;
              &lt;img style="float: left;" src="&lt;?php echo $featured_img; ?&gt;" width="204" height="204" alt="" /&gt;
  
              &lt;div style="float: left; width: 580px; padding: 10px;"&gt;
                &lt;p&gt;&lt;?php echo substr(strip_tags($col_posts-&gt;getItemById($posttotid[$posttotal-$i])-&gt;getPostContent()), 0, 400); ?&gt;&lt;/p&gt;
                &lt;p&gt;
                  &lt;a href="&lt;?php echo $col_posts-&gt;getItemById($posttotid[$posttotal-$i])-&gt;getUrl(); ?&gt;"&gt;
                    &lt;img src="&lt;?php echo $this-&gt;getSkinUrl('images/view_btn.jpg'); ?&gt;" width="170" height="32" alt="" /&gt;
                  &lt;/a&gt;
                &lt;/p&gt;
              &lt;/div&gt;
            &lt;/div&gt;
          &lt;/div&gt;
    &lt;?php
        }
    ?&gt;
  </code></pre>
  
  <p>Let me know if I need to clarify myself. I appreciate your time.</p>