Có plugin Genesis Connect cho WooCommerce nhưng cá nhân tôi thích phương pháp này hơn.
- Thêm phần sau vào functions.php của chủ đề con :
// Declare WooCommerce support for your theme
add_theme_support( 'woocommerce' );
- Tạo một tệp có tên woocommerce.php trong thư mục chủ đề con có mã sau:
/**
* WooCommerce Template
*
* Template used for all WooCommerce views in order to avoid using Genesis Connect
*
*/
//* Add WooCommerce content output
if ( function_exists( 'woocommerce_content' ) ) {
// Remove standard post content output
remove_action( 'genesis_loop', 'genesis_do_loop');
// Replace the default Genesis loop with WooCommerce's
add_action( 'genesis_loop', 'woocommerce_content' );
}
genesis();