Product Thumbnails Are not Appearing
-
Good afternoon All,
I reached out yesterday and appreciate the help received. I am following up as I have hit another wall.
I have updated my woocommerce and wordpress recently. Prior to updating, my Product Thumbnails were displaying perfectly in the “related products” and “shop” areas of my site. http://www.devronltd.com
At this point, they are simply displaying their title text with no thumbnail.
I understand this may end up being a theme conflict but don’t even know where to start to look as I am not the developer. I have copied a string of .php from my functions.php file hoping it may help define the problem.
Thanks in advance,
B
/*———————————————————————————–*/
add_filter(‘widget_text’,’execute_php’,100);
function execute_php($html){
if(strpos($html,”<“.”?php”)!==false){
ob_start();
eval(“?”.”>”.$html);
$html=ob_get_contents();
ob_end_clean();
}
return $html;
}function related_products($id) {
$url = get_permalink( $id );
$array = get_post_meta($id);
$src = wp_get_attachment_image_src( get_post_thumbnail_id($id), $size);
$sku = $array[_sku][0];
$price = $array[_price][0];
$showCart = $array[show_add_to_cart_button][0];
$showPrice = $array[show_prices][0];$html = ‘<div class=”inner-product-wrapper”>’;
$html .= ‘<div class=”thumbnail-container”>’;
$html .= ‘‘;
$html .= ‘<div class=”product-thumbnail-wrapper”></div>’; $html .= ‘‘;
$html .= ‘<div class=”product-buttons”>’;
$html .= ‘<div class=”product-buttons-inner”>’;
if ( $showCart == “Yes”) :
$html .= ‘ID ).’?add-to-cart=’.$id.'” rel=”nofollow” data-product_id=”‘.$id.'” data-product_sku=”‘.$sku.'” data-quantity=”1″ class=”button add_to_cart_button product_type_simple”>Add to cart‘;
endif;
$html .= ‘Details‘;
$html .= ‘</div>’;
$html .= ‘</div><!– .product-buttons –>’;
$html .= ‘<div class=”product-actions”></div><!– .product-actions –>’;
$html .= ‘</div><!– .thumbnail-container –>’;
$html .= ‘<div class=”product-info show-ratings”>’ ;
$html .= ‘<h3 class=”product-title”>‘.get_the_title( $id ).’</h3>’;
if ( $showPrice == “Yes”) :
$html .= ‘<span class=”price”><span class=”amount”>’.$price.'</span></span>’;
endif;
$html .= ‘</div><!– .product-info –>’;
$html .= ‘</div><!– .inner-product-wrapper –>’;
echo $html;
}/*———————————————————————————–*/
The page I need help with: [log in to see the link]
The topic ‘Product Thumbnails Are not Appearing’ is closed to new replies.