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

    I have searched and found a couple of threads addressing having/adding the default sidebar to the right of the single products page. I have tried the recommended code and css but cannot achieve a visible sidebar. I have only been able to create the proper space for the sidebar to be.

    This is the code I tried to use. I have since removed the PHP from the functions file and the CCS
    https://kriesi.at/support/topic/moving-sidebar-on-single-product-pages-to-the-right/#post-806718

    VERSION 457
    PHP 72

    here is a product page to refer

    Steve

    • This topic was modified 5 years, 3 months ago by thesmokingpipeshop. Reason: include version #
    #1126363

    Nothing? or This cannot be done?

    #1126549

    Hi,
    Sorry for the late reply, Try adding this code to the end of your functions.php file in Appearance > Editor:

    //add right sidebar to woo product page
    add_action('init','ava534345953_init', 50);
    function ava534345953_init() {
    	add_action( 'woocommerce_after_single_product_summary', 'avia_add_sidebar', 25);
    }
    
    function avia_close_image_div() {
    	global $avia_config;
    	echo "</div>
    ";
    }
    
    function avia_add_sidebar() {
    	if(is_product()) {
    	$avia_config['currently_viewing'] = "shop_single";
    	get_sidebar();
    	}
    }

    Then add this code in the General Styling > Quick CSS field or in the WordPress > Customize > Additional CSS field:

    .single-product-main-image {
        width: 25%;
    }
    
    .single-product-summary {
        overflow: hidden;
        width: 45%;
        float: left;
        margin-right: 5%;
    }
    
    .single-product .sidebar {
        width: 25%;
    }

    2019-08-10-182654

    Best regards,
    Mike

    #1126552

    Thanks Mike for the code. I have applied it to the site but am not getting the sidebar on the single product page. I get the space for it but the sidebar does not render. Am I missing a setting someplace in the theme?

    Steve

    #1126556

    Hi,
    Thanks for the feedback, I took a look at your site and found that you have this custom css hiding it:

    .woocommerce.woocommerce-page .sidebar.sidebar_sidebar_right.alpha.units {
        display: none!important;
    }

    please look for this and remove it, Please see the screenshot in Private Content area.

    Best regards,
    Mike

    #1126597

    Thank you Mike I didn’t realize, it is working now :)
    Steve

    #1126619

    Hi Steve,

    Great, I’m glad that Mike could help you out. Please let us know if you should need any further help on the topic or if we can close it.

    Best regards,
    Rikard

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Single product page right sidebar’ is closed to new replies.