C
C
CosKrem2020-11-18 14:14:57
User navigation
CosKrem, 2020-11-18 14:14:57

Moving sidebar on mobile?

Tell me please. How to make the sidebar call button show on small screens?
Required :
From the computer - the sidebar is visible.
From the mobile - the button: "filters" - you press and the sidebar appears.
Thanks

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Litvinenko, 2020-11-18
@AntonLitvinenko

CosKrem ,

// вывод сортировки и кнопки переключателя фильтра
remove_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30 );
add_action('woocommerce_before_shop_loop', 'storm_catalog_ordering', 30);
function storm_catalog_ordering() {
  ?>
    <div class="catalog-sorting-wrapper">

      <button type="button" class="fixed-toggle filter-toggle" id="filter-toggle">
        <i class="fa fa-filter"></i><?php _e('Filter','storm-store') ?>
      </button>

      <div class="product-sorting">
        <span class="product-sorting-label"><?php _e('Сортировать:','storm-store') ?></span>
        <div class="select-wrapper">
          <?php woocommerce_catalog_ordering() ?>
        </div>
      </div>

    </div>
  <?php
}

what's in this function. First I turn off the default sorting because I need to push the sorting and the sidebar button into certain wrappers.
And then I put my wrappers, sidebar button and sorting in exactly the same place

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question