Tagged: change sidebar, woocommerce sidebar
-
AuthorPosts
-
September 14, 2020 at 2:46 am #1245579
Hi there,
Is it easy and possible to change the Woocommerce sidebar from appearing on the left side, above the product info? I would prefer the sidebar content come below/after the product info. This is pretty important…
Thank you!
September 15, 2020 at 1:09 pm #1246029Hey Dino0103,
Thank you for the inquiry.
Would you like to adjust the default location of the product sidebar? If you want to move the sidebar from the bottom of the product image to the right of the product content, please use the snippets from the following thread.
// https://kriesi.at/support/topic/shop-sidebar-to-right-side/#post-1245585
Best regards,
IsmaelSeptember 16, 2020 at 3:24 am #1246139Thank you very much! I used that code and it works.
However, I was wondering if it’s possible to move the product image out of its own left side column and above the product info column. The goal is for the product column to be wider with the image in it, rather than the image being in its own left column, which forces the main product info column to be small.
Alternately, I wonder if it is possible to keep the sidebar at the bottom at all times and keep the product info section as full width (two columns with image on left and info on right is fine) above it?
Thank you!
September 18, 2020 at 8:05 am #1246689Hi,
That should be possible as well. We could wrap the product image and the description container inside another div and increase the containers’ width.
Please replace the snippet with the following code.
function ava534345953_init() { add_action( 'woocommerce_after_single_product_summary', 'avia_add_sidebar', 25); add_action( 'woocommerce_after_single_product_summary', 'avia_close_image_div_mod', 20); add_action( 'woocommerce_before_single_product_summary', 'avia_open_image_div_mod', 1 ); } function avia_open_image_div_mod() { echo "<div class='product-main-container'>"; } function avia_close_image_div() { echo "</div>"; } function avia_close_image_div_mod() { echo "</div>"; } function avia_add_sidebar() { if(is_product()) { $avia_config['currently_viewing'] = "shop_single"; get_sidebar(); } } add_action('init','ava534345953_init', 50);
And use this css code instead.
.product-main-container { width: 70%; float: left; } .product-main-container::after { content: ''; display: table; clear: both; } .product-main-container .single-product-main-image, .product-main-container .single-product-summary { width: 100%; }
keyword: product sidebar full width image description
Best regards,
IsmaelSeptember 19, 2020 at 2:21 am #1246954HI there,
I tried that but it broke the website. Thankfully I knew to make a backup beforehand, so it’s fine and the site is back up already! I am wondering if I did something wrong in pasting the code….? What would you suggest – should I try again?Thanks
AdelleSeptember 22, 2020 at 12:50 pm #1247601Hi,
Thank you for the update.
Did you remove the previous snippet that we added in the functions.php file? What was the error? Please post the FTP details in the private field so that we could check the site properly and implement the modification if necessary.
Best regards,
IsmaelOctober 3, 2020 at 5:46 am #1250248This reply has been marked as private.October 6, 2020 at 3:35 am #1250678This reply has been marked as private.October 6, 2020 at 12:17 pm #1250824Hi,
Sorry for the delay. We managed to get into the file server but we are not sure which folder contains the site. We did not find a folder named “mauibedstores”, only “mauidoors”, but we are not sure if this is the same site. Could you point us to the correct directory or site path?
Best regards,
IsmaelOctober 6, 2020 at 10:12 pm #1250992This reply has been marked as private.October 6, 2020 at 10:19 pm #1250994This reply has been marked as private.October 7, 2020 at 11:43 pm #1251230This reply has been marked as private.October 8, 2020 at 12:44 pm #1251405Hi,
Thank you for the info.
We adjusted the snippet in the functions.php file and added css code in the child theme’s style.css file. Please remove the browser history and purge the cache prior to checking the page.
Best regards,
IsmaelOctober 8, 2020 at 10:20 pm #1251573Thanks for your diligent help! That looks pretty good on the single product pages on mobile, though ideally all the content would shift to filling the space on mobile, and not show a white gap on the right side on mobile – as seen in this screenshot: https://prnt.sc/uvpz6c
If that white space/sidebar gab can’t be helped, I think it’s probably okay. Hopefully the client does not mind…*URGEN* – One more important request to fix regarding sidebar behavior on mobile:
I see now that the sidebar on the portfolio item pages is showing above the content incorrectly on mobile version – as seen in this screenshot: http://prnt.sc/uvq3ji
I’m not sure if I did that with CSS and forgot or if this is a result of your recent changes? (I’m not very good with CSS.) Can you check my css codes below and see if I need to remove something so that the portfolio sidebar appears below the content on mobile?We are trying to publish to the domain ASAP so all of these small fixes are urgently needed so we can proceed. Unfortunately we are already behind schedule.
Thanks very much!October 8, 2020 at 10:23 pm #1251575This reply has been marked as private.October 8, 2020 at 11:38 pm #1251581This reply has been marked as private.October 13, 2020 at 5:40 am #1252419 -
AuthorPosts
- You must be logged in to reply to this topic.