Title: creativethemes's Replies | WordPress.org

---

# creativethemes

  [  ](https://wordpress.org/support/users/creativethemes/)

 *   [Profile](https://wordpress.org/support/users/creativethemes/)
 *   [Topics Started](https://wordpress.org/support/users/creativethemes/topics/)
 *   [Replies Created](https://wordpress.org/support/users/creativethemes/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/creativethemes/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/creativethemes/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/creativethemes/engagements/)
 *   [Favorites](https://wordpress.org/support/users/creativethemes/favorites/)

 Search replies:

## Forum Replies Created

Viewing 1 replies (of 1 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[MarketPress Product Image Gallery] Have first image of marketpress gallery replace featured image](https://wordpress.org/support/topic/have-first-image-of-marketpress-gallery-replace-featured-image/)
 *  [creativethemes](https://wordpress.org/support/users/creativethemes/)
 * (@creativethemes)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/have-first-image-of-marketpress-gallery-replace-featured-image/#post-5593172)
 * replace all code from **marketpress-product-gallery/includes/gallery.php** with
   this one:
 *     ```
       $html = '';
       	if( has_post_thumbnail( $post->ID )  ){
       	$html .= '<div class="mp_gallery_wrap">';
       		$html .= '<div class="mp_gallery_viewport">';
       			$html .= '<div class="mp_gallery_image">';
       				$large = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' );
       				$html .= '<img class="mp_zoom" src="'. $large[0] .'">';
       			$html .= '</div>';
       			$html .= '<div class="mp_gallery_title"><span>';
       				$html .= $mp_prod_image_title[0];
       			$html .= '</span></div>';
       		$html .= '</div>';
   
       		if( $mp_prod_img_id[0] != '' ){
       		$html .= '<div class="mp_image_collection">';
       			$html .= '<div class="mp_control_left"><img class="mp-icon" src="'. plugins_url() .'/marketpress-product-gallery/img/left.png"></div>';
       			$html .= '<div class="mp_control_right"><img class="mp-icon" src="'. plugins_url() .'/marketpress-product-gallery/img/right.png"></div>';
       			$html .= '<div class="mp_image_list"><ul>';
       				$img_smale = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'small' );
       				$html .= '<li>';
       				$html .= '<img src="'. $img_smale[0] .'">';
       				$html .= '<input type="hidden" value="'.$large[0].'">';
       				$html .= '<div class="mp_hide"></div>';
       				$html .= '</li>';
       				$i = 0;
       				foreach( $mp_prod_image_paths as $mp_prod_image_path ) {
       				$html .= '<li>';
       				$thumb = wp_get_attachment_image_src($mp_prod_img_id[$i], 'mp-thumb');
       				$large = wp_get_attachment_image_src($mp_prod_img_id[$i], 'mp-large-view');
       				$html .= '<img src="'. $thumb[0] .'">';
       				$html .= '<input type="hidden" value="'.$large[0].'">';
       				$html .= '<div class="mp_hide">' . $mp_prod_image_title[$i++] . '</div>';
       				$html .= '</li>';
       				}
       			$html .= '</ul></div>';
       		$html .= '</div>';
       		}
       	$html .= '</div>';
       	}
       ```
   

Viewing 1 replies (of 1 total)