Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #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.

    #1429541

    Hey 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,
    Ismael

    #1429550

    I’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.

    #1429804

    Hi,
    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,
    Mike

    #1429806

    Thanks 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.

    #1429824

    Hi,
    Thank you, the Dev Team will reply in the feature request thread, you should receive email notifications when they have reviewed it.
    Thank you for your patience and for using Enfold.

    Best regards,
    Mike

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.