Add theme hỗ trợ Woocommerce không bị lỗi khi update

  Woocommerce
add_action( 'after_setup_theme', 'setup_woocommerce_support' );

 function setup_woocommerce_support()
{
  add_theme_support('woocommerce');
}

Nguồn: https://wordpress.stackexchange.com/questions/90199/how-to-declare-woocommerce-support-in-your-theme

Hoặc đoạn đầy đủ dưới:

// add theme suport WooCommerce
function akasa_theme_setup() {
	// WooCommerce in general.
	add_theme_support( 'woocommerce' );
	// Enabling WooCommerce product gallery features (are off by default since WC 3.0.0).
	// zoom.
	add_theme_support( 'wc-product-gallery-zoom' );
	// lightbox.
	add_theme_support( 'wc-product-gallery-lightbox' );
	// swipe.
	add_theme_support( 'wc-product-gallery-slider' );
}
add_action( 'after_setup_theme', 'akasa_theme_setup' );
0 0 đánh giá
Đánh giá bài viết
Please wait...
Theo dõi
Thông báo của
0 Góp ý
Cũ nhất
Mới nhất Được bỏ phiếu nhiều nhất
Phản hồi nội tuyến
Xem tất cả bình luận