MsPrince
Forum Replies Created
-
Hi, Unfortunately this code doesn’t seem to work for my site, the featured image remains blank and the mp gallery box disappears from the product page as well, perhaps something else would do? I am using the template function so I wonder does that have an effect.
Thank you so much for the help, it worked very nicely.
Also in order for the featured image to be the product page image and the first displayed on the page I also replaced this bit in the same file$large = wp_get_attachment_image_src($mp_prod_img_id[0], ‘mp-large-view’);
$html .= ‘<img class=”mp_zoom” src=”‘. $large[0] .'”>’;with this bit, It seems to be working although I’m no expert.
$featured_img_id = get_post_thumbnail_id( $id );
$large = wp_get_attachment_image_src($featured_img_id, ‘mp-large-view’);
$html .= ‘<img class=”mp_zoom” src=”‘. $large[0] .'”>’;Also, something I just noticed is that after you add an image to the gallery you cannot delete the very first one, it can be replaced, but even if you delete the path it will keep the image.
Just thought I’d mention it since someone might want to clear out all images except the featured image.Cheers and thanks again!
Very nice with adding the featured image. I just had a question about what was put in paste bin and where to add it. So in the file mp_image_gallery.php do you replace the bit on line 231-242 with what is in paste bin? when I do that it does put the featured image in but it does not include the other images in the gallery? Is this correct, since it seems to get rid of multiple images and only displays the one featured image. I feel I must not be adding it correctly. If you have any insight as to how to make this work I would be grateful.
Thanks for sharing.I replaced the featured image in the product template with your plugin, looks good now, although the featured image is still separately displayed elsewhere but not a problem for me.