Monday, June 25, 2012

Woocommerce sidebar with Cyberchimps NeuroPro

The sidebar kept getting wrapped to the bottom, on my WooCommerce pages, when I'm using CyberChimp's Wordpress Neuro Pro theme. To fix this, I hacked out a few changes:

1. Add these lines to your custom CSS inside the Neuro Pro theme:

.storeSidebar { float: left;}
.products ul, ul.products {clear: none;}
ul.products li.first {clear: none;}


2. Edit the file "wp-content/plugins/woocommerce/templates/archive-product.php" inside your wordpress plugins directory. (And also do the same for "single-product.php" , "taxonomy-product_cat.php", and "

2.a Remove the line:

<?php do_action('woocommerce_sidebar'); ?>



2.b Above the line where the main content gets inserted (eg :

<?php woocommerce_archive_product_content(); ?>



add the lines:

<div class=storeSidebar> 
<?php do_action('woocommerce_sidebar'); ?> 
</div>


That should do it! Well, the sidebar is forced to be on the left (can't be switched to the right), but that's what I wanted in the first place, so that's good enough for me at the moment.

No comments: