WOOF - WooCommerce Products Filter

Text attributes does not works in WOOF as they are not supported by WooCommerce

From woocommerce version 3.3.2 text attributes not supported, use only selectable attributes which supported. WOOF doesn work with text attributes! https://wordpress.org/support/topic/updated-to-3-3-1-and-text-attributes-now-all-select-type/ https://wordpress.org/support/topic/attributes-all-set-to-select-after-update-3-3/ https://github.com/woocommerce/woocommerce/issues/19178 Minimal woocommerce version for WOOF: v.3.4 (2020 year)

Manipulating by CSS class in tag body while filtering

If it is necessary to add any special CSS class in tag <body>, it is possible with hook ‘body_class’. Example:

  On the code above is scenario: when WOOF searching is going by ‘brand’ and current page is page of category with ID 23 – system add CSS classes ‘term-shoes tax-product_cat’ to tag <body>. […]

Auto scroll to products top in redirect mode

In file footer.php of your current WordPress theme (use child theme) add next code:

  .woof_products_top_panel_content – is a CSS class of container where scrolling will be finished. You can use any container with any CSS class or id …

Auto scroll to products after their filtering in redirect mode

Open file functions.php of your current wp theme Find there code: <?php wp_footer(); ?> and drop after it next code:

Now after filtering in redirect mode will be scrolling effect as here  

Get the plugin to work with ACF date field

Source: https://wordpress.org/support/topic/custom-date-fields/ Customer question: Hello, I am trying to get the plugin to work with ACF date field, but it seems not possible. The problem is with date formats – WOOF uses timestamp and ACF uses Y-m-d format in the database. Is there a way to solve this? Support: Hello Unfortunately not as for filtration […]

Can I override any extension view file for my site needs?

From ver.2.2.4/1.2.4 it is possible to override templates of extensions. Folder should be placed in current WordPress theme folder and should has the same file structure as the original extension. Example: wp-content/themes/my_child_theme/woof/ext/image/views/woof.php

Conflict with elementor page builder

Hi, We are using your plugin and Elementor plugin on same page. They started to conflict for some reasons. Elementor page builder doesnt open correctly. As soon your plugin disabled, ti loads up nicely without issues. Youw and Elementor pluign ofr us are crucial, and they worked ok till some moment…   We fixed the […]

ERROR 403 when searching by author

Original: https://wordpress.org/support/topic/error-403-when-searching-by-author/ Searching by author makes 403 error on the site. Possible reason: The problem was in the .htaccess file. With this part (which pretends to discourage brute force attacks by blocking author scans) Solution: in .htaccess file remove next code if its exists:

 

GDPR

WooCommerce Products Filter is GDPR friendly plugin and doesn collect any personal information as customers email addresses and names. All actions with persons works trough data which keeps in native WordPress data tables. Statistic: collects anonymous IP addresses Products Messenger: works through users meta tables and if user was deleted – no any communication with […]

How to make infinite scroll for filtered products also

From WOOF v.2.1.7 its possible to realize with the plugin YITH Infinite Scrolling. Install it and set next settings on its options page: Navigation Selector: nav.woocommerce-pagination Next Selector: nav.woocommerce-pagination a.next Item Selector: li.product Content Selector: ul.products

Working with WPML

WOOF is absolutely compatible with WPML. All taxonomies labels can be translated into all languages in: tab Advanced -> “WPML taxonomies labels translations” using next syntax-example (english is default in the example):

   

How to manipulate by CSS if search is going

If it necessary to manipulate with any view on the web site when WOOF search is going its possible to use CSS class ‘woof_search_is_going’ in tag <body>. Its always appears when WOOF search is going in the redirect mode.

Styles and codes which are applied on the demo site

To make demo site more attractive and demonstrated different features the next code is applied: In the plugin settings -> tab Advanced -> “Custom CSS code”

Code for the rounded squares for color palette is taken here: https://products-filter.com/possible-color-selector-show-circular-shaped-colors-instead-square/ In the functions.php file of the current wp theme added the next PHP code: https://products-filter.com/hook/woof_get_more_less_button_xxxx/ – example for […]

If it’s possible to have the Color selector show circular-shaped colors instead of square

Drop the next CSS code into the plugin settings page -> tab Options -> “Custom CSS code”:

Size of color boxes can be adjusted by:

   

How to save a selected filter in a session so the website keeps it remembered for the user

Works from v.1.1.6/2.1.6. PHP 5.4 is minimum requirement. Drop the next script example in the functions.php file of the current wp theme:

   

Actions after AJAX filtering done

There is in-built javascript event in the filter: woof_ajax_done So, if you want to apply any js code after WOOF searching by AJAX done, for example re-initialization of product galleries, use next code construction somewhere in js file of current wp theme (better use child theme):

Customer request about this feature before it was implemented: […]

How to disable chosen js lib (drop-downs) for mobile devices

open your current theme functions.php file drop there next php code:

How to set toggle on the right side

Use next CSS code in tab Advanced -> Custom CSS code:

 

How to set logic ‘AND’ for taxonomies in the search request

Question: Is it possible for product tags (when displayed as checkbox) to filter products according to an “AND” logic? Question: If I use a query like this: “?swoof=1&pa_attr1=value_a,value_b” That gives me the products with value_a OR value_b. Is there a way to get only the products that have value_a AND value_b at the same time?  Answer: https://products-filter.com/hook/woof_main_query_tax_relations/ Works […]

How to manipulate with search data options

Question: Is it possible to show the products filtered by default on load by a certain taxonomy Answer: yes, do next: open your current theme file functions.php on the same bottom of the file add next code

Use comma if you need more welcome taxonomies It is just an example-question, by your own logic you can […]

How to force filtered results to show in three columns only

In AJAX mode sometimes is necessary to show count of columns not equal to 4. In this case do next please: open your current theme file functions.php on the same bottom of the file drop next code:

 save the file That is all … Remember – any count of columns (6 for example) is […]

Working WOOF with Essential Grid

To make them works together: From version 2.1.4 it is possible use Template Essential Extension using attribute tpl_index for [woof_products] shortcode. Install and use this extension https://products-filter.com/extencion/essential-grid/ OR create new file in your current wp theme folder (or in child theme folder) and name it for example woo_essential_grid.php drop in woo_essential_grid.php next code:

  Create new page where you […]

Filtering by product attribute doesn work!

There are can be 2 reasons: In the attributes settings checkbox ‘Enable Archives?’ should be checked!! If you see that term-page for the first time and that checkbox is checked – any way press save button on the page. Type should be ‘Select’ – Type determines how you select attributes for products. Under admin panel […]

Pagination troubles in AJAX mode

In some themes pagination structure changed from native woo code to smth another – this is the main reason when pagination in ajax mode is failed. Native pagination structure: So you have 2 ways: change pagination html as it should be if you know how is it use redirect mode instead of AJAX mode  

Searching is slow OR the plugin make page loading slow

A lot of cheap hosting company provide their services with weak hardware. So because of this reason products searching maybe slow slow. You can do next steps: use cache plugins, for example this one switch off ‘dynamic recount’ in the filter and ‘hide empty terms’ options use Autoptimize add more memory to your wp site […]

How to create beauty links for predefined search results

Sometimes in shops it is necessary create navigation for products with already search results. It is possible to get in some steps: Install this plugin: https://wordpress.org/plugins/pretty-link/ Make your predefined search link, example: https://demo.products-filter.com/product-category/clothing/?swoof=1&locations=spain&paged=1&pa_color=red&pa_size=xl Add new link as on the screen:  Now you have beauty link which you can use in your special product menu: https://demo.products-filter.com/spain-red-clothes-red-color By the way […]

No premium features accessible in Codecanyon version, still red and blocked

It is just a cache. After buying premium version of the plugin just uninstall free version of WOOF, download from https://codecanyon.net/downloads zip with WOOF and unpack it. Inside of the unpacked zip you will find woocommerce-products-filter.zip – Install it on your site. Then after installation go to the plugin settings page and press CTRL+F5 or CTRL+R- and your […]

Auto scroll to element after AJAX is done

In the plugin settings page -> tab Advanced -> “JavaScript code after AJAX is done” drop next code:

.woocommerce-result-count – is a CSS class of container where scrolling will be finished. You can use any container with any CSS class or id …    

How to manipulate with the site css depending on the device

Sometimes users need manipulate the site css depending of the client device <PC or Mobile>. You can do it with the next code example, which should be placed on the file footer.php of your current WordPress theme:

In the current example shows how to hide woof auto form button on PC and show it on […]

I just bought the plugin and cant install it. Error!!

100% you are trying to install Codecanyon bundle. To install the plugin you should unpack downloaded zip file from CodeCanyon and you will find there woocommerce-products-filter.zip which should be installed. If you have previous version or free one – remove it before please, and do not worry about the data as it is in the data […]

How to show or hide widget only on selected site pages

To manipulate with the appearance of the widgets you can use next plugin: Widget Logic Here you can find woocommerce conditional tags: https://docs.woothemes.com/document/conditional-tags/ For example you can create different filters by shortcode [woof] for each category page using its attributes tax_only and by_only. Then drop usual text-widget on the sidebar and write there shortcode with its attributes. […]

Filter gives empty results

It can be some reasons: Permalinks. To make WOOF works you are need set permalinks, for example as on the next screen: WooCommerce settings in tab Products, sub-tab Display -> ‘Shop Page Display’ as show categories – wrong. Plugin cant filter in this mode. So you are need switch to ‘Show products’. But if you […]