Site icon Anthony Carbon

Woocommerce genesis sidebar connect

Hi guys! good day.. I have a very short code here to connect your Woocommerce pages to the genesis sidebar layout. Paste the codes below on your functions.php.

NOTE: If the codes below does not work, means your current Woocommerce hooks has been re-locate or Woocommerce hooks has been updated from before structure.

# WOOCOMMERCE CONNECT
remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10 );
remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20 );
add_action( 'woocommerce_before_main_content', '_woocommerce_output_content_wrapper', 10 ); 
add_filter( 'woocommerce_show_page_title', 'no_title' );
function no_title(){
	return false;
}
function _woocommerce_output_content_wrapper(){
	echo '<div class="content"><div class="entry-content">';
	genesis_do_breadcrumbs();
	echo '<h1 class="entry-title" itemprop="headline">';
	woocommerce_page_title();
	echo '</h1>';
}
Exit mobile version