Viewing 18 posts - 1 through 18 (of 18 total)
  • Author
    Posts
  • #539385

    Hi,

    Why is the sidebar on the single product page displayed on the left/bottom?
    My default setting for sidebar position is – right.

    Also how can I get rid of the sidebar on the product page alltogether?

    regards,
    Peter

    #540850

    Hey!

    Sidebar seems to be working correctly there, below the product gallery at the right.

    Regards,
    Josue

    #541092

    Hi Josue,

    The sidebar is under the gallery. So it is not the right sidebar it is more like bottom left sidebar.

    I would like the side bar to be either:
    1. on the right hand side of the page (to the right of the product description) or
    2. not have the sidebar on the product page at all

    How can I achieve this?

    many thanks

    • This reply was modified 9 years ago by TheElear.
    #541132

    Hey!

    Try adding this code to the Quick CSS:

    .single-product .sidebar {
        display: none !important;
    }

    That will hide the sidebar in single products view.

    Cheers! 
    Josue

    #541266

    THank you Josue,

    DO you know that this side bar does not display on the right hand side?
    Even though this is defined in the template?

    regards,

    #541397

    That’s actually the intended result, product gallery appears first and then the sidebar.

    Regards,
    Josue

    #542852

    I was searching to find information on the same issue, and this is the most current thread. Would you be able to expand on why this is the ‘desired result’? As with the other poster, I want to have an actual sidebar on my product pages, not have it show under the image. Just like the normal behaviour of most other themes. I have to revert to not using a sidebar because my client thinks it looks so bad (and I agree), which is a poor solution.

    #542909

    Josue,

    Following torndownunit can you also advise how to make it appear on the right?

    regards

    #543377

    I found the thread. It just seems crazy that this feature seems widely asked about on the forums. Why not just make “Right Sidebar” a right sidebar rather than all the additions to functions and css?

    #543446

    Hey!

    Try adding this at the very end of your theme / child theme functions.php file:

    
    #
    # wrap single product image in an extra div
    #
    
    function avia_add_image_div() {
     echo "<div class='single-product-main-image alpha'>";
    }
    
    function avia_close_image_div() {
     echo "</div>";
    }
    
    #
    # wrap single product summary in an extra div
    #
    
    function avia_add_summary_div() {
     echo "<div class='single-product-summary'>";
    }
    
    function avia_close_summary_div() {
     echo "</div>"; //close out the summary
     get_sidebar();
    }
    
    function avf_product_sidebar_layout_mod($layout){
     if( is_single() )$layout = "sidebar_left";
     return $layout;
    }
    
    add_action('init', 'ava_product_sidebar_mod');
    function ava_product_sidebar_mod() {
     add_action( 'woocommerce_before_single_product_summary', 'avia_add_image_div', 2 );
     add_action( 'woocommerce_before_single_product_summary', 'avia_close_image_div', 20 );
     add_action( 'woocommerce_before_single_product_summary', 'avia_add_summary_div', 25 );
     add_action( 'woocommerce_after_single_product_summary', 'avia_close_summary_div', 3 );
     add_filter( 'avf_product_sidebar_layout', 'avf_product_sidebar_layout_mod', 5);
    }

    And this to Quick CSS:

    @media only screen and (min-width: 767px) {
    	.single-product .product {
    		width: 68%;
    		margin-right: 4%;
    		clear: none;
    		float: left;
    	}
    }

    That will create a right sidebar in the single product view.

    Cheers!
    Josue

    • This reply was modified 9 years ago by Josue.
    #553315

    This worked for me! thank you – just what I needed.

    #553346

    You are welcome, glad to help :)

    Regards,
    Josue

    #555265

    Josue – one follow up question. The Sidebar looks great on the desktop view, but on the mobile view the right nav content disappears, but I think that added divs are still in there creating unwanted space. This makes the main content really compressed on the mobile view. any update to the above code snippet you gave us that could fix that?

    #555277

    Hi @clutchnyc,

    Can you post the link to your website please?

    Regards,
    Josue

    #555285
    #555288

    Modify the CSS part to:

    @media only screen and (min-width: 767px) {
    	.single-product .product {
    		width: 68%;
    		margin-right: 4%;
    		clear: none;
    		float: left;
    	}
    }

    Cheers!
    Josue

    #555294

    Awesome! Works perfectly.

    Thank you VERY much!! I really appreciate your help.

    #555299

    Glad to help :)

    Regards,
    Josue

Viewing 18 posts - 1 through 18 (of 18 total)
  • You must be logged in to reply to this topic.