Hi,
I am nearing completion of development for a client using the Woopress theme, and I have noticed a performance issue when displaying related products on a single product page.
I have narrowed it down to the etheme_create_slider function in theme-functions.php and more specifically, the following while loop:
while ($multislides->have_posts()) : $multislides->the_post();
$_i++;
if(class_exists(‘Woocommerce’)) {
global $product;
if (!$product->is_visible()) continue;
echo ‘<div class=”slide-item product-slide ‘.$slider_type.’-slide”>’;
woocommerce_get_template_part( ‘content’, ‘product-slider’ );
echo ‘</div><!– slide-item –>’;
}
endwhile;
I have put some timing debugging code at the beginning and of the function – and its taking 8 seconds in some cases to execute the function – see private content for live example.
Many thanks