Skip to content

Instantly share code, notes, and snippets.

@blogjunkie
Created October 1, 2015 14:20
Show Gist options
  • Save blogjunkie/d76b57c19587be9a5654 to your computer and use it in GitHub Desktop.
Save blogjunkie/d76b57c19587be9a5654 to your computer and use it in GitHub Desktop.
Adding support for WooCommerce in Genesis via Stéphane Bergeron. "I'm using a modified version of this: http://joshmallard.com/2013/09/23/woocommerce-genesis-2-0/ The way I modified it is that, I don't put anything in functions.php other than the add_theme_support( 'woocommerce' ); line. Instead I replace what Josh has in his woocommerce.php tem…
// Declare WooCommerce support for your theme
add_theme_support( 'woocommerce' );
<?php
/**
* WooCommerce Template
*
* Template used for all WooCommerce views in order to avoid using Genesis Connect
* Save this into `themename/woocommerce.php`
*
*/
//* 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();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment