WooCommerce-Unterstützung in Themes aktivieren – Snippet

Wenn Dein WordPress Theme WooCommerce nicht unterstützt, dann kannst Du das mit diesem Code in Deiner functions.php Datei ganz leicht ändern:

function mytheme_add_woocommerce_support() {
	add_theme_support( 'woocommerce' );
	add_theme_support( 'wc-product-gallery-zoom' );
	add_theme_support( 'wc-product-gallery-lightbox' );
	add_theme_support( 'wc-product-gallery-slider' );
} 
add_action( 'after_setup_theme', 'mytheme_add_woocommerce_support' );

Quelle: medium.com

Was das hilfreich?