-
AuthorPosts
-
September 9, 2023 at 8:19 pm #1418583
Sidebar widgets on single product pages are not showing all of the widgets that are placed in the “display everywhere” section of the widgets.
Additionally, I tried duplicating the widgets and placing them in the single product area of the widgets for the sidebar and that did not work either.
We are trying to achieve all of the same filters on the single product pages as well.
September 11, 2023 at 4:44 am #1418709Hey nahmialm,
Thank you for the inquiry.
Please note that product filters will only be visible on the default shop page and the product archive pages. The filters will not appear on single product pages. If you wish to display a list of product attributes in the single product sidebar, you may need to look for a third-party plugin.
Best regards,
IsmaelSeptember 19, 2023 at 3:22 pm #1419592OK, thanks for that information.
I have tried to place a text widget on the product pages and that is not displaying either. There seems to be a glitch. Regarding that. Looking for assistance placing widgets in the sidebar on product pages.
September 20, 2023 at 6:17 am #1419643Hi,
We modified the code in the functions.php and style.css file, and the widgets are now displaying as it should but for some reason, there are extra widgets below the dynamic sidebar. To hide the extra widgets temporarily, we added this css code.
.single-product section#woocommerce_product_search-5, .single-product section#woocommerce_product_categories-4 { display: none !important; }
Adjusted modification in the style.css file.
.product-main-container { width: 56%; float: right; margin-left: 50px; } .product-main-container::after { content: ''; display: table; clear: both; } .product-main-container .single-product-main-image, .product-main-container .single-product-summary { width: 100%; } #top #main .sidebar { border-left: 0; border-right-style: solid; border-right-width: 1px; margin-left: 0; } .single-product section#woocommerce_product_search-5, .single-product section#woocommerce_product_categories-4 { display: none !important; }
And in the functions.php file.
/* Move product sidebar */ function ava_move_product_sidebar() { remove_action( 'woocommerce_before_single_product_summary', 'avia_close_image_div', 20); add_action( 'woocommerce_before_single_product_summary', 'avia_close_image_div_mod', 20); add_action( 'woocommerce_before_single_product_summary', 'avia_open_image_div_mod', 1); add_action( 'woocommerce_after_single_product_summary', 'avia_close_image_div_mod', 4); add_action( 'woocommerce_after_single_product_summary', 'avia_add_sidebar', 25); } add_action('init','ava_move_product_sidebar', 50); function avia_open_image_div_mod() { echo " <div class='product-main-container'>"; } function avia_close_image_div_mod() { echo "</div> "; } function avia_add_sidebar() { if(is_product()) { $avia_config['currently_viewing'] = "shop_single"; get_sidebar(); } } add_filter('avf_custom_sidebar', function($sidebar) { if(is_product()) { $sidebar = 'Single Product Pages'; } return $sidebar; }, 10, 1);
Best regards,
IsmaelSeptember 20, 2023 at 2:33 pm #1419721Thank you so much! Really appreciate the help getting the widgets to show in the sidebar!
September 22, 2023 at 7:55 am #1419996 -
AuthorPosts
- The topic ‘Sidebar widgets on single product pages are not showing all of the widgets’ is closed to new replies.