I installed woocommerce on a non woo theme, I wish to style it, without much change. But when I installed it, the sidebar is displayed out of any container (widgets are shown in their divs but without a wrapper). Now I used
add_action('woocommerce_before_main_content', 'my_theme_wrapper_start', 10);
add_action('woocommerce_after_main_content', 'my_theme_wrapper_end', 10);
function my_theme_wrapper_start() {
echo '<section id="main">';
}
function my_theme_wrapper_end() {
echo '</section>';
}
From the documentation, and this works for woocommerce just fine. But my sidebar is still at the bottom, without a wrapper. Is there a way to wrap the sidebar as well, and place it next the content of the shop, using just hooks, not copying any files out of the plugin?
I figured it out, this is a 'framework' that works for me, in case anybody needs it:
This will create a wrapper with a right sidebar. You can customize it further if you need to. Hope it helps.