• Resolved mikedev

    (@ingematic)


    Hi,
    i have a question for you.
    Thank you for the reply.
    The FILTERS button on mobile, on a product category page, overlaps the category description. How can I avoid this?

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter mikedev

    (@ingematic)

    Another Question
    I manage the Brand by the plugin “Perfect Brands for WooCommerce” by quadlayers.

    Do i can insert the Brand in your product filters?

    How?

    Thank you

    Plugin Author annastaa

    (@annastaa)

    Hello Mikedev,

    As for the “Filters” button overlapping description, this sounds like a purely CSS issue that can be tweaked via a line of custom CSS code.

    If, on the other hand, you wish to change the location of your “Filters” button, there are 2 (programmatic) ways to do that:

    1. If you have a child theme, add this code to its functions.php file:

    add_filter( 'awf_js_data', function( $js_data ) {
    	$js_data['togglable_preset']['insert_btn_before_container'] = '.class-or-id-of-the-needed-selector';
    
    	return $js_data;
    } );

    2. If you prefer the Javascript way, you can achieve almost the same effect by adding the following code in annasta Filters > Plugin Settings > Custom Javascript:

    jQuery( document ).ready( function( $ ){
      if( typeof( awf_data ) !== 'undefined' && 'togglable_preset' in awf_data ) {
     
          awf_data.togglable_preset.insert_btn_before_container = '.class-or-id-of-the-needed-selector';
     
          var $filters_button = $( '.awf-togglable-preset-btn' ).first();
     
          if( 0 < $filters_button.length ) { 
              var $before_container = $( awf_data.togglable_preset.insert_btn_before_container ).first();
              if( 0 < $before_container.length ) { $filters_button.insertBefore( $before_container ); }
          }
      }
    });

    In both cases, please replace the “.class-or-id-of-the-needed-selector” part of code with the needed selector preceding classes with a dot, or id with a #.

    As for the Perfect Brands plugin, to add the Brands filter, select “Brands” in the Add Filter select box located at the top of the the Preset Filters section of your preset settings, and push the Add Filter button.

    Plugin Author annastaa

    (@annastaa)

    Dear Mikedev,

    We haven’t heard from you for a while, so I will go ahead and mark this thread as resolved. Please don’t hesitate to ask further questions, whenever you have them!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Category Page Issues with button Filter’ is closed to new replies.