Tagged: right sidebar, woocommerce
-
AuthorPosts
-
August 7, 2019 at 10:46 pm #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-806718VERSION 457
PHP 72here is a product page to refer
Steve
- This topic was modified 5 years, 4 months ago by thesmokingpipeshop. Reason: include version #
August 10, 2019 at 4:03 am #1126363Nothing? or This cannot be done?
August 11, 2019 at 12:28 am #1126549Hi,
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%; }
Best regards,
MikeAugust 11, 2019 at 1:34 am #1126552Thanks 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
- This reply was modified 5 years, 4 months ago by thesmokingpipeshop.
August 11, 2019 at 3:02 am #1126556Hi,
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,
MikeAugust 11, 2019 at 7:00 am #1126597Thank you Mike I didn’t realize, it is working now :)
SteveAugust 11, 2019 at 12:14 pm #1126619 -
AuthorPosts
- The topic ‘Single product page right sidebar’ is closed to new replies.