Reply 314207 to: Single product page not functioning properly

Avatar: Olga Barlow
Olga Barlow
Support staff
January 11, 2022 at 12:05

Hello,

1) Add the below code to child theme functions.php

add_filter('woocommerce_breadcrumb_main_term', function($term, $terms) {
	global $post;
	$cat = etheme_get_custom_field('primary_category');
		if(!empty($cat) && $cat != 'auto') {
			return get_term_by( 'slug', $cat, 'product_cat' );				
		}
	return $term;
}, 10, 2);

2) Because we use a built-in layout https://prnt.sc/26cevnt instead of the single product builder and it works a little bit differently. In simple words, the built-in layout has only 1 sticky section and uses the different JS library, single product builder has the option to set multiple sticky columns with multiple sticky parent columns, and it does not support browser resize. So, if the built-in layout is suitable for you then you can use that instead of the single product builder. Let me know about this.

Regards

Go To The Whole Conversation In Topic
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.