title: Wordpress PHP duplicating thumb
body: <p>I am not very skilled in php, but I believe something in this section is causing my Fancybox images to duplicate. </p>
  
  <p>When Fancybox opens, the user can use the Next and Prev links, but each image is duplicated twice. I have tested by replacing fancybox with another lightbox and the problem still persists.</p>
  
  <p>Does anyone see the issue in this, have any ideas how to fix or hack it?</p>
  
  <pre><code>&lt;?php
      $work_count = 0;
      $recent_work_args = apply_filters( 'evolution_recent_work_args', array(
          'showposts' =&gt; (int) get_option('evolution_posts_work_num'),
          'category__not_in' =&gt; (array) get_option('evolution_exlcats_work')
      ) );
      $recent_work_query = new WP_Query( $recent_work_args );
      while ( $recent_work_query-&gt;have_posts() ) : $recent_work_query-&gt;the_post();
          ++$work_count;
          $width = apply_filters( 'evolution_home_work_width', 203 );
          $height = apply_filters( 'evolution_home_work_height', 203 );
          $titletext = get_the_title();
          $thumbnail = get_thumbnail($width,$height,'item-image',$titletext,$titletext,true,'Work');
          $thumb = $thumbnail["thumb"];
          $lightbox_title = ( $work_title = get_post_meta($post-&gt;ID, 'work_title',true) ) ? $work_title : $titletext;
          $work_description = ( $work_desc = get_post_meta($post-&gt;ID, 'work_description',true) ) ? $work_desc : truncate_post( 50, false );
  ?&gt;
          &lt;div class="r-work&lt;?php if ( 0 == $work_count % 5 ) echo ' last'; ?&gt;"&gt;
              &lt;?php print_thumbnail($thumb, $thumbnail, $titletext, $width, $height, 'item-image'); ?&gt;
              &lt;span class="overlay"&gt;&lt;/span&gt;
              &lt;a href="&lt;?php echo esc_url($thumbnail['fullpath']); ?&gt;" class="zoom fancybox" title="&lt;?php echo esc_attr( $lightbox_title ); ?&gt;" rel="work_gallery"&gt;&lt;/a&gt;
              &lt;a href="&lt;?php echo esc_url($thumbnail['fullpath']); ?&gt;" class="zoom fancybox" title="&lt;?php echo esc_attr( $lightbox_title ); ?&gt;" rel="work_gallery"&gt;&lt;/a&gt;
              &lt;p&gt;&lt;?php echo esc_html( $work_description ); ?&gt;&lt;/p&gt;
          &lt;/div&gt; &lt;!-- end .r-work --&gt;
  &lt;?php endwhile; wp_reset_postdata(); ?&gt;
  </code></pre>