WooCommerce: Delete sidebar for category pages on Twenty twelve child theme

advertisements

I would like to remove the sidebar on WooCommerce category pages and make the products there full width. I would very much appreciate any help with what code to put where. I have tried googling but haven't been able to get anything to work.

I am using a Twenty twelve child theme.
happilyprinted.com

Thank you.


You'll need to add the following to your theme's functions.php template file:

add_action('wp', create_function("", "if (is_archive(array('product'))) remove_action( 'woo_main_after', 'woocommerce_get_sidebar', 10);") );