Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #15810

    This is a continuation of a post that was closed prematurely: http://www.kriesi.at/support/topic/override-sidebar-position-for-shop-pages#post-71817

    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.

    #89098

    Hi Michael,

    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.

    Regards,

    Mya

    #89099

    Hey!

    All conditional tags are listed here: http://wcdocs.woothemes.com/codex/theming/conditional-tags/ – eg is_product_category() should work in your case.

    Best regards,

    Peter

    #89100

    Thank you.

    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!!

    #89101

    Add following code to css/custom.css:

    .template-shop .sidebar.sidebar_left{
    margin-left: 0px;
    }

    and in woocommerce-config/config.php replace:

    echo "<div class='template-shop content ".$avia_config['content_class']." units'>";

    with:

    echo "<div class='template-shop content sidebar_left units'>";

    #89102

    PROBLEM SOLVED!!!

    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']."'>";

    with:

    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.

    #89103

    Hi michaelspencer,

    Glad Peter was able to help :)

    Regards,

    Devin

Viewing 7 posts - 1 through 7 (of 7 total)

The topic ‘Override Sidebar Position For Shop Pages (Part II)’ is closed to new replies.