Categories
blog Storefront WooCommerce wordpress

wordpress woocommerce storefront tab to accordion

tab templates/single-product/tabs

function.php


/**
 * @snippet       Move product tabs beside the product image - WooCommerce
 */
 
remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 10 );
add_action( 'woocommerce_single_product_summary', 'woocommerce_output_product_data_tabs', 60 );
add_filter('woocommerce_product_description_heading', '__return_null');
add_filter('woocommerce_product_additional_information_heading', '__return_null');

Categories
blog ecommerce Storefront WooCommerce wordpress

WooCommerce Storefront Child Theme: Remove Sidebar @ Single Product Page

Hide the sidebar on product pages of Woocommerce Storefront child theme. The following snippet disables the sidebar with no additional CSS required, whilst still making the product page content area 100% wide.

/**
 * Disable sidebar on product pages in Storefront.
 *
 * @param bool $is_active_sidebar
 * @param int|string $index
 *
 * @return bool
 */
function product_remove_sidebar( $is_active_sidebar, $index ) {
	if( $index !== "sidebar-1" ) {
		return $is_active_sidebar;
	}
if( ! is_product() ) {
return $is_active_sidebar;
}

return false;
}

add_filter( 'is_active_sidebar', product_remove_sidebar', 10, 2 );

 

code to the functions.php file in your Storefront child theme.

Categories
blog ecommerce Storefront WooCommerce

Remove Storefront Sidebar

add_action( ‘get_header’, ‘remove_storefront_sidebar’ );

function remove_storefront_sidebar() {
if ( is_product() ) {
remove_action( ‘storefront_sidebar’, ‘storefront_get_sidebar’, 10 );
}
}