title: Display specific ads on first page Osclass
body: <p>I'm fairly new to PHP (or programming for that matter) and I've been stuck on an issue for some time now (my logic fails at the moment, please don't judge, I'm learning)</p>
  <p>I want to display only specific items on Premium ads. For example there should be ads from Cars, Real Estate but NOT from Dating, Tobacco and so.
  I looked around but I'm a bit lost.
  The theme I'm using right now is displaying the Premium ads by the following</p>
  <pre><code>&lt;div id=&quot;premium&quot; class=&quot;products grid&quot;&gt;
        &lt;h2&gt;&lt;?php _e('Featured listings', 'delta'); ?&gt;&lt;/h2&gt;
  
        &lt;div class=&quot;block&quot;&gt;
          &lt;div class=&quot;prod-wrap&quot;&gt;
            &lt;?php $c = 1; ?&gt;
            &lt;?php while( osc_has_premiums() ) { ?&gt;
              &lt;?php del_draw_item($c, true, del_param('premium_home_design')); ?&gt;
                
              &lt;?php $c++; ?&gt;
            &lt;?php } ?&gt;
  
            &lt;?php if(osc_count_premiums() &lt;= 0) { ?&gt;
              &lt;div class=&quot;home-empty&quot;&gt;
                &lt;img src=&quot;&lt;?php echo osc_current_web_theme_url('images/home-empty.png'); ?&gt;&quot; /&gt;
                &lt;strong&gt;&lt;?php _e('No premium listing yet', 'delta'); ?&gt;&lt;/strong&gt;
              &lt;/div&gt;
            &lt;?php } ?&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>
  <p>For now my approach was to search the forums and find how to display the specific items. I did the following:</p>
  <pre><code>    &lt;?php osc_query_item(array(
      &quot;category&quot; =&gt; &quot;109,108,107,106,105,104,102,101,100,99,98,257&quot;));
  
  if( osc_count_custom_items() == 0) { ?&gt;
      &lt;p class=&quot;empty&quot;&gt;&lt;?php _e('No Listings', 'modern') ; ?&gt;&lt;/p&gt;
  &lt;?php } else { ?&gt;
   &lt;div class=&quot;home-container premium&quot;&gt;
        &lt;div class=&quot;inner&quot;&gt;
              &lt;div id=&quot;premium&quot; class=&quot;products grid&quot;&gt;
           &lt;tbody&gt;
              &lt;?php $class = &quot;even&quot;; ?&gt;
              &lt;?php while ( osc_has_custom_items() ) { ?&gt;
               
          &lt;tr class=&quot;&lt;?php echo $class. (osc_item_is_premium()?&quot; premium&quot;:&quot;&quot;) ; ?&gt;&quot;&gt;
                      &lt;?php if( osc_images_enabled_at_items() ) { ?&gt;
                       &lt;td class=&quot;photo&quot;&gt;
                          &lt;?php if( osc_count_item_resources() ) { ?&gt;
                              &lt;a href=&quot;&lt;?php echo osc_item_url() ; ?&gt;&quot;&gt;
                                  &lt;img src=&quot;&lt;?php echo osc_resource_thumbnail_url() ; ?&gt;&quot; width=&quot;75&quot; height=&quot;56&quot; title=&quot;&lt;?php echo osc_item_title(); ?&gt;&quot; alt=&quot;&lt;?php echo osc_item_title(); ?&gt;&quot; /&gt;
                              &lt;/a&gt;
                          &lt;?php } else { ?&gt;
                              &lt;img src=&quot;&lt;?php echo osc_current_web_theme_url('images/no_photo.gif') ; ?&gt;&quot; alt=&quot;&quot; title=&quot;&quot;/&gt;
                          &lt;?php } ?&gt;
                       &lt;/td&gt;
                      &lt;?php } ?&gt;
                       &lt;td class=&quot;text&quot;&gt;
                           &lt;h3&gt;&lt;a href=&quot;&lt;?php echo osc_item_url() ; ?&gt;&quot;&gt;&lt;?php echo osc_item_title() ; ?&gt;&lt;/a&gt;&lt;/h3&gt;
                           &lt;p&gt;&lt;strong&gt;&lt;?php if( osc_price_enabled_at_items() ) { echo osc_item_formated_price() ; ?&gt; - &lt;?php } echo osc_item_city(); ?&gt; (&lt;?php echo osc_item_region();?&gt;) - &lt;?php echo osc_format_date(osc_item_pub_date()); ?&gt;&lt;/strong&gt;&lt;/p&gt;
                           &lt;p&gt;&lt;?php echo osc_highlight( strip_tags( osc_item_description() ) ) ; ?&gt;&lt;/p&gt;
                       &lt;/td&gt;                                       
                   &lt;/tr&gt;
                  &lt;?php $class = ($class == 'even') ? 'odd' : 'even' ; ?&gt;
              &lt;?php } ?&gt;
          &lt;/tbody&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;?php }; ?&gt;
  </code></pre>
  <p>Which works great! Now my issues is I am not able to understand on how to re write the piece of code to actually show my items in the preformatted theme CSS. My guess is that this happens in this line of code (under the preformatted bloc / product wrap)</p>
  <pre><code>php del_draw_item($c, true, del_param('premium_home_design')); ?
  </code></pre>
  <p>Any help would be appreciated!</p>
  <p>Using this piece of code</p>
  <pre><code>&lt;?php osc_query_item(array(
      &quot;category&quot; =&gt; &quot;109,108,107,106,105,104,102,101,100,99,98,257&quot;));
  
  if( osc_count_custom_items() == 0) { ?&gt;
      &lt;p class=&quot;empty&quot;&gt;&lt;?php _e('No Listings', 'modern') ; ?&gt;&lt;/p&gt;
  &lt;?php } else { ?&gt;
   &lt;div class=&quot;home-container premium&quot;&gt;
        &lt;div class=&quot;inner&quot;&gt;
              &lt;div id=&quot;premium&quot; class=&quot;products grid&quot;&gt;
           &lt;tbody&gt;
              &lt;?php $class = &quot;even&quot;; ?&gt;
               &lt;?php $itmprem=1;?&gt;
              &lt;?php while ( osc_has_custom_items() ) { ?&gt;
               
          &lt;tr class=&quot;&lt;?php echo $class. (osc_item_is_premium()?&quot; premium&quot;:&quot;&quot;) ; ?&gt;&quot;&gt;
          
                      &lt;?php del_draw_item($itmprem, true, del_param('premium_home_design')); ?&gt;   
                      &lt;?php $itmprem++;?&gt;
                   &lt;/tr&gt;
                  &lt;?php $class = ($class == 'even') ? 'odd' : 'even' ; ?&gt;
              &lt;?php } ?&gt;
          &lt;/tbody&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;?php }; ?&gt;
              &lt;/div&gt;
  
            &lt;/div&gt;
  
          &lt;/div&gt;
  
        &lt;/div&gt;
  
      &lt;/div&gt;
  
    &lt;?php } ?&gt;
  </code></pre>
  <p>Gives me a loop of same item 3 times, from the categories I want, but only that. Yes I know I'm bad, but I fail to see the solution.</p>