Created
February 14, 2013 07:28
-
-
Save kloon/4951136 to your computer and use it in GitHub Desktop.
WooCommerce Shelflife do not show sidebar on single product pages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
remove_action( 'woo_main_after', 'woocommerce_get_sidebar', 10 ); | |
add_action( 'woo_main_after', 'woo_custom_sidebar', 10 ); | |
function woo_custom_sidebar() { | |
if ( ! is_product() ) { | |
woocommerce_get_sidebar(); | |
} | |
} | |
remove_action( 'woocommerce_before_main_content', 'shelflife_before_content', 10 ); | |
add_action( 'woocommerce_before_main_content', 'woo_custom_before_content', 10 ); | |
function woo_custom_before_content() { | |
?> | |
<!-- #content Starts --> | |
<?php woo_content_before(); ?> | |
<div id="content" class="col-full"> | |
<?php | |
global $woo_options; | |
if ( $woo_options[ 'woo_breadcrumbs_show' ] == 'true' ) { | |
woo_breadcrumbs(); | |
} | |
?> | |
<!-- #main Starts --> | |
<?php woo_main_before(); ?> | |
<?php if ( ! is_product() ) { ?> | |
<div id="main" class="col-left"> | |
<?php } else { ?> | |
<div id="main" class="fullwidth"> | |
<?php } ?> | |
<?php | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment