title: if category empty return a message
body: <p>i have this code to get some elements from wordpress</p>
  
  <pre><code>global $post;
  
  $i=0;
  
  $args = array( 'numberposts' =&gt; 5, 'category' =&gt;5,'order'=&gt;'DESC','orderby'=&gt;'post_date','suppress_filters' =&gt; 0 );
  
  $myposts = get_posts( $args );
  $has_posts = true;
  
  foreach( $myposts as $post ) :  setup_postdata($post); ?&gt;
  
  
  &lt;?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post-&gt;ID ), 'single-post-thumbnail' ); ?&gt;
  
  &lt;li&gt;
  
  &lt;?php if($image){ ?&gt;
  
  
  &lt;div class="news_left"&gt;&lt;a href="&lt;?php the_permalink(); ?&gt;"&gt;&lt;img src="&lt;?php echo $image[0]; ?&gt;" alt="" width="191" height="132" /&gt;&lt;/a&gt;&lt;/div&gt;
  
  &lt;?php } ?&gt;
  
  &lt;?php
      $content = apply_filters('the_content', get_the_content());
      $content = explode("&lt;/p&gt;", $content);
  ?&gt;
  
  &lt;div class="news_right"&gt;
  
      &lt;h2&gt;&lt;a href="&lt;?php the_permalink(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt;
  
      &lt;span class="date"&gt;Date: &lt;?php the_time('j/m/Y') ?&gt;&lt;/span&gt;
  
      &lt;?php echo $content[1] . "&lt;/p&gt;";//echo String::content_limit(200,'&lt;p&gt;'); ?&gt;
  
      &lt;a href="&lt;?php the_permalink(); ?&gt;"&gt;Read More&lt;/a&gt;
  
  &lt;/div&gt; 
  
  &lt;div class="clear"&gt;&lt;/div&gt;   
  
  &lt;/li&gt;
  
  &lt;?php $i++; endforeach; ?&gt;
  </code></pre>
  
  <p>i need to put a condition to return text message if category is empty.like no posts to display , please note that the post use WPML as the language switcher </p>