• Having a bear of a time here. I’ve successfully modified the Product Image and Product Thumbnails (gallery images) to add the attribute: nopin="nopin". But for the life of me, I can’t figure out where the image for Related Products is generated from. From looking at related.php I thought it was in content-product.php. No luck there.

    This is how I added it to product-image.php:

    Simply added ‘nopin’ => ‘nopin’, to the attributes.

    $attributes = array(
    			'title'                   => get_post_field( 'post_title', $post_thumbnail_id ),
    			'data-caption'            => get_post_field( 'post_excerpt', $post_thumbnail_id ),
    			'data-src'                => $full_size_image[0],
    			'data-large_image'        => $full_size_image[0],
    			'data-large_image_width'  => $full_size_image[1],
    			'data-large_image_height' => $full_size_image[2],
    			'nopin' => 'nopin',
    		);

    Other than the same code in product-thumbnails.php, I’m just not finding anywhere else to add this. Help?!?

  • The topic ‘Trying to add attribute to Related Products images’ is closed to new replies.