我想我有点明白了。。。看来我在这里遗漏了一点。
function bad_billy_beard_add_woocommerce_support() {
add_theme_support( \'woocommerce\', array(
\'thumbnail_image_width\' => 150,
\'single_image_width\' => 300,
\'product_grid\' => array(
\'default_rows\' => 3,
\'min_rows\' => 2,
\'max_rows\' => 8,
\'default_columns\' => 4,
\'min_columns\' => 2,
\'max_columns\' => 5,
),
) );
}
add_action( \'after_setup_theme\', \'bad_billy_beard_add_woocommerce_support\' );
remove_action( \'woocommerce_before_main_content\', \'woocommerce_output_content_wrapper\', 10);
remove_action( \'woocommerce_after_main_content\', \'woocommerce_output_content_wrapper_end\', 10);
add_action(\'woocommerce_before_main_content\', \'bad_billy_beard_start\', 10);
add_action(\'woocommerce_after_main_content\', \'bad_billy_beard_end\', 10);
function bad_billy_beard_start() {
echo \'<section id="main">\';
}
function bad_billy_beard_end() {
echo \'</section>\';
}