Tagged: enfold, feature, sidebar, woocommerce
-
AuthorPosts
-
January 8, 2024 at 9:52 am #1429523
Hi guys,
As it stands when you are using Enfold with WooCommerce the sidebar on the shop and product archive pages disappears on mobiles. This means any filters also disappear.
I would normally add a second widget area above the product grid and duplicate the widgets so we have seperate mobile filters to desktop filters.
This is inefficient and on my larger sites caused difficulty managing filters.I have a simple solution to this using a small JS script that allows the sidebar to show and hide via a button on mobiles.
See private content for details.
January 8, 2024 at 12:01 pm #1429541Hey Thomas,
Thank you for the inquiry.
Have you tried enabling the Sidebar on Smartphones option in the Enfold > Sidebar Settings panel? And if you need to move the sidebar above the product loop, you can try this script.
function ava_custom_script_mod(){ ?> <script> (function($) { // move the product category sidebar above the content on mobile view function av_move_prodcat_sidebar() { var is_mobile = false; var is_archive = $("body").is(".tax-product_cat"); if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) { is_mobile = true; } if( is_archive && is_mobile ) { $(".sidebar").prependTo(".template-shop.content"); } } $(document).ready(function() { av_move_prodcat_sidebar(); }); })(jQuery); </script> <?php } add_action('wp_footer', 'ava_custom_script_mod');
Best regards,
IsmaelJanuary 8, 2024 at 12:29 pm #1429550I’ll give this a try but the main issue here is needing to show and hide the filters. So its not just putting them above.
January 11, 2024 at 11:49 am #1429804Hi,
If you would like to suggest this as a feature, the Dev Team has opened a new Github Feature Request for users to place requests and follow them as the Dev Team reviews them.
This would be the appropriate please to submit requests, thank you for your patience and understanding and for using Enfold.Best regards,
MikeJanuary 11, 2024 at 12:16 pm #1429806Thanks Mike,
I’ve put my current solution on the feature request list in full.
It will need reworking to be an integrated part of the theme instead of the way I have used widget areas.
January 11, 2024 at 5:26 pm #1429824 -
AuthorPosts
- You must be logged in to reply to this topic.