title: how to display wordpress post excerpt only on the image post which has excerpt on hover
body: <p>I have created a gridview of wordpress posts, and i am trying to display excerpt on mouse hover for each <code>thumbnail(post)</code> but if any <code>thumbnail(post)</code> don't have any excerpt content it should not display that.</p>
  
  <pre><code>    &lt;?php
      $args = array('post_type' =&gt; 'press');
  
      $counter = 1; //start counter
  
      $grids = 4; //Grids per row
  
      global $query_string; //Need this to make pagination work
  
  
      /*Setting up our custom query (In here we are setting it to show 12 posts per page and eliminate     all sticky posts) */
      query_posts ( $args );//query_posts($query_string . '&amp;caller_get_posts=6&amp;posts_per_page=12');
  
      if(have_posts()) :  while(have_posts()) :  the_post(); 
      ?&gt;
      &lt;?php
      //Show the left hand side column
  if($counter &gt;= 1) :
  ?&gt;
          &lt;div class="griditemleft" style="position:relative;"&gt;
          &lt;div class="postimage"&gt;
              &lt;a href="&lt;?php the_permalink(); ?&gt;" title="&lt;?php the_title_attribute(); ?&gt;"&gt;&lt;?php the_post_thumbnail('category-thumbnail'); ?&gt;&lt;/a&gt;
  &lt;div class="excerpt"&gt;&lt;?php if post have excerpt then display .excerpt on hover else display only the thumbnail?&gt;
          &lt;/div&gt;
          &lt;h2 class="press-title"&gt;&lt;a href="&lt;?php the_permalink(); ?&gt;" title="&lt;?php the_title_attribute(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt;
      &lt;/div&gt;
                  &lt;h2 class="press-title"&gt;&lt;a href="&lt;?php the_permalink(); ?&gt;" title="&lt;?php the_title_attribute(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt;
              &lt;/div&gt;
  &lt;?php
  //Show the right hand side column
  elseif($counter == $grids) :
  ?&gt;
  
  &lt;div class="clear"&gt;&lt;/div&gt;
  &lt;?php
  $counter = 0;
  endif;
  ?&gt;
  &lt;?php
  $counter++;
  endwhile;
  //Pagination can go here if you want it.
  endif;
  ?&gt;
  </code></pre>