I've installed the woocommerce plug in and having some issues with the sidebar and footer on the products page (called webshop on my site). The footer is all "wrapped" on the left side and no sidebar is displayed att all.
I've read thru a number of posts on this already and followed a few solutions. I've added the following to the functions.php. It solved some issues however I guess I missed some DIV's in this.
Appreciate any suggestions to get the sidebar and footer displayed correctly (all other pages it's shown correctly. (my site: www.demilliano.net)
PHP Code:
add_action('wp', create_function("", "if (is_archive(array('product'))) remove_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10);") );
//Unhook (remove) the WooCommerce sidebar on individual product pages
add_action('wp', create_function("", "if (is_singular(array('product'))) remove_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10);") );
//Unhook (remove) the WooCommerce sidebar on all pages
remove_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10);
function bfa_open_woocommerce_content_wrappers()
{
echo '<div class="wrapper">';
}
function bfa_close_woocommerce_content_wrappers()
{
echo '</div>';
}
function bfa_prepare_woocommerce_wrappers()
{
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', 'bfa_open_woocommerce_content_wrappers', 10 );
add_action( 'woocommerce_after_main_content', 'bfa_close_woocommerce_content_wrappers', 10 );
}
add_action( 'wp_head', 'bfa_prepare_woocommerce_wrappers' );