August 29, 2012 at 12:47 am #15810
It appears that the issue with all the solutions suggested to date is that the is_shop() function is returning false when invoked from the product category pages. As such, the sidebar is being generated with class=sidebar_right instead of class=sidebar_left.
It is unclear to me why the is_shop() function is returning false. Perhaps there is some other way to detect the presence of the product category page so that the suggested solutions will work and the sidebar class will be correctly set to sidebar_left?
Thank you.August 29, 2012 at 2:11 am #89098
I believe Ismael was looking into this for you. I’m going to tag him as well as the other rest of the support team to see if they shed any light on the subject.
MyaAugust 29, 2012 at 5:35 am #89099
All conditional tags are listed here: http://wcdocs.woothemes.com/codex/theming/conditional-tags/ – eg is_product_category() should work in your case.
PeterAugust 29, 2012 at 6:17 pm #89100
is_product_category() now correctly detects the presence of the product category page and the suggested solutions now correctly set the class=sidebar_left for the div generated by line 32 of sidebar.php.
However, the sidebar still displays below the page content instead of on the left. It seems that overriding the sidebar position set by the template is a little more involved than just changing the class in the div generated by sidebar.php.
I see that div #main still displays a class=sidebar_right. And even if I override this to sidebar_left through FireBug, the sidebar still shows at the bottom of the page and the rest of the page gets pretty messed up.
Quickly reaching the limit of my troubleshooting expertise here. Help!!August 31, 2012 at 7:18 am #89101
Add following code to css/custom.css:
and in woocommerce-config/config.php replace:
echo "<div class='template-shop content ".$avia_config['content_class']." units'>";
echo "<div class='template-shop content sidebar_left units'>";August 31, 2012 at 2:11 pm #89102
I applied your changes and in woocommerce-config/config.php replaced:
echo "<div id='main' class='container_wrap ".$avia_config['layout']." template-shop shop_columns_".$avia_config['shop_overview_column']."'>";
echo "<div id='main' class='container_wrap sidebar_left template-shop shop_columns_".$avia_config['shop_overview_column']."'>";
Thank you to everyone for your persistence and patience in helping me get this problem resolved. Very much appreciated.August 31, 2012 at 2:54 pm #89103
The topic ‘Override Sidebar Position For Shop Pages (Part II)’ is closed to new replies.