Code

Discussion on Filter Everything | WordPress/WooCommerce Product Filter

Discussion on Filter Everything | WordPress/WooCommerce Product Filter

Cart 15,723 sales
Recently Updated

Stepasyuk supports this item

Supported

This author's response time can be up to 1 business day.

8980 comments found.

Hi,

I display a filter of type “Custom field” as a drop-down list. The filter is displayed well but displays the slugs and not the name of the terms.

My ACF field is of type checkbox and the return value is on “Table”.

Thanks for your help.

We have to turn off the URL-friendly permalink manager from our plugin, the code is in the code snippet plugin, as it conflicts with one of the plugins on your site that changing permalinks.

Best Regards,
- Victor

Thank you. How can I clear the cache? I don’t see the option in the settings.

Hi cviale

Usually, when you update any posts or product it should clean it automatically, in order to display newly applied taxonomies or any other entities that were applied to the posts. Also, if you go to the filter set and hit update it should clean it as well. This is not always the case, so you can add the next get parameter on your let’s say shop page like ”?reset_filters_cache=true” so it’ll look like “mysite.com/shop/?reset_filters_cache=true”

Additionally, you can write a function from this example:

if ( class_exists( '\FilterEverything\Filter\Plugin' ) ) {
    $fe = new \FilterEverything\Filter\Plugin();
    $fe->resetTransitions();
}

Best Regards,
- Victor

Hi, I just purchased extended support for this issue – we got a project to make just and only a new filtration on the website. We made a developer website for it. Our client uses Elementor and have its own Templates and Widgets for everything. The problem is we cannot find the match with the Filter and the WP_Query that it allows to use. Can we kindly ask you, to look at it? We are more than open to send you all the credentials to dev web.

Hi Musilda

Thank you for choosing Filter Everything PRO.

Please send the credentials to the wp-admin dashboard following this document so we can check it.

Also, please send the link to the exact page where you want to display the filters, and what exactly you want to filter on this page.

Please note, that we need an exact page, and not the Elementor template link itself, as it can be used for any page.

Best Regards,
- Victor

Hi Victor, we sent the credentials.

We have checked the site, and there’s some issue with the default listing CPT that comes with the “listivo core” plugin for the theme functionality.

With every other CPT, it is working well, that were created for example with the CPT UI plugin and their taxonomies, but this CPT is somehow uniquely created. Perhaps to work with the custom fields that can be added to it.

It can filter it, but the counters are all (0) as those created taxonomies to this specific CPT are not connected.

Best Regards,
- Victor

Hi, great plugin. Is it possible to increase the resolution of the image that is output for the brands images? I know I can change the dimensions with the wpc_brands_width_height hook – but this changes it with css rather than changing the output image size – which stays as the 150×150 thumbnail – I’d like to use the ‘large’ image size for example. Thanks.

Hi goodbanter

Thank you for choosing Filter Everything PRO.

Unfortunately, there is no such hook at the moment. But you can go to the:

filter folder/src/wpc-helpers.php

There you can find this function:

function flrt_get_term_swatch_image( $term_id, $filter ) {
    $src = false;
    $image_key = 'image';

    if ( strpos( $filter['e_name'], 'pa_' ) === 0 ) {
        $image_key = 'product_attribute_' . $image_key;
 }

    if ( $filter['e_name'] === 'product_cat' ) {
        $image_key = 'thumbnail_id';
 }

    $image_key = apply_filters( 'wpc_image_term_meta_key', $image_key, $filter );

    $image_id = get_term_meta( $term_id, $image_key, true );
    if ( $image_id ) {
        $src = wp_get_attachment_image_url( $image_id, 'thumbnail' );
 }

    return $src;
}

Here you can change it from the thumbnail to the needed value, like full/large/etc:

$src = wp_get_attachment_image_url( $image_id, 'thumbnail' );

Best Regards,
- Victor

Thanks Victor

When there is a Category and Subcategory checked like this: https://i.imgur.com/7qVF9fE.png

Is it possible to clear all checked selections when the Top Category is unchecked? Right now, it stays on Dog Food when I uncheck “Dog”: https://i.imgur.com/q1XdndS.png

Thanks.

Hi shayatik

Unfortunately, there is no such functionality at the moment. We are going to add it to the development list so that the dev team can check it and perhaps it will be added to the plugin functionality in future updates.

Best Regards,
- Victor

I have 5 queries on a single page and I need each of those 5 queries to update based on the filter parameters but I am only able to select one query from the “And what to filter” dropdown. Can you let me know how to make it so ALL queries on the page will update based on the filter parameters? Cheers,

Hi bradley2083

Thank you for choosing Filter Everything PRO.

Unfortunately, the filter set can only work with one query at a time. There is no possibility to make it work with multiple queries at the same time.

But what you can do is apply 5 different filter sets on the same page, and if you have the same exact filters for all of them you can filter with one filter all of 5 of them after you apply 5 filter sets on different queries. However, please note that the counters will show numbers for only one query.

Best Regards,
- Victor

Hello,

I have purchased the Filter Everything Pro plugin. I created a set of filters based on product tags. For one product, I selected the tag “Hořčík.” The filter correctly shows one item with this tag, which is fine. However, I cannot figure out how to apply the filter to the product listing when using the Elementor “Product Archive” widget.

Could you please advise me on how to apply the filter to product listings in Elementor?

Thank you for your help. Test page here: https://hnojik.cz/domain-page/

We have checked the filter set, the issue is that you had turned on the hierarchy view. Hierarchy is very sensitive to the include/exclude categories as it is ruining the hierarchy chain and as a result not displaying it all.

We have turned it off and it and other category terms are displayed in the filter terms.

My second question is whether I can display only items from the main category Semínka on that page before I start selecting filtering options.
Do you mean like prefilter products, choose a certain category and display only products from this category before filtering? If this is the case, then the answer is no, not by our plugin. You can apply settings on the WP_Query in order to display that.

Or, if you want to open the page with an already selected filter, you can use the URL address when choosing the needed filter. This way the menu like shop/attributes/etc will lead to this page with an already selected filter.

Best Regards,
- Victor

Hello, thank you for your responses. I have one more question. Where can I set the number of items displayed on the page? I would like to show all the items that match the filter without having to navigate through multiple pages.

Hi rudolftyburec

If by that you mean where you can configure the amount of product to display per page – it is in the Elementor settings for the element that you are using to display your products. But we’d highly recommend leaving pagination, as if you display all of the products at the same time it will cause long page loading and more resources from the server.

Best Regards,
- Victor

Hi there,

Not a big issue but I noticed the apply button that I have in most of my filters has changed colour from blue to purple.

Maybe it happened during a resent update but is there a way to edit this? I never bother to change it so I have no idea where to look/start.

Hi matthewm174

Those styles are inherited from the theme itself, if they have higher priority, so perhaps there were some changes on the site that changed this color. Or it was changed here – https://prnt.sc/4qGKhVogU_qp which are general colors including the button as well.

Best Regards,
- Victor

You hit the nail on the head.

Someone switched the theme yesterday and switched it back. So that colour section you showed must have been edited.

All sorted now.

Great support as always. Thanks

We are glad to hear that the issue was resolved.

Best Regards,
- Victor

we redesigned the website push staging to live the plugin not working And what to filter? Determines what exactly the Posts list (WP_Query) on a page should be filtered nothing showing on dropdown need urgent help how to solve it.

Thanks in advance

Hi casters

Please ask your site developer to check if the WP_Query is being used on the page. Also, ask him to check if the data is not corrupted, including any problems such as mixed content issues and any other possible conflicts on the site with the theme, plugins, or the object cache (or any other cache plugins).

Best Regards,
- Victor

Hello! We are currently using this plugin and have been for a while now and it’s working perfectly. However, now the client would like to have a page built with only specific products listed (around 10 products specific to ID, not category). How can we setup a product page with only these specific products?

Hi artefactdesign

We are not sure how this question is connected to the plugin itself. If you want to have a page with some products based on the IDs of these products, you can use your own WP_Query Template with parameters of the needed IDs in order to display them.

Best Regards,
- Victor

I have a multilingual site, the name of the filter is written in Ukrainian, in the Russian version it is also displayed in Ukrainian. We use WPML and WooCommerce Multilingual & Multicurrency . How to resolve the issue?

Hi teplospektr

Sounds like everything is working correctly. But perhaps you would want to check this documentation page – https://filtereverything.pro/resources/with-wpml-polylang/ and follow the exact settings, in order to create different translations. So for each language, you will have the ability to create a separate filter set, with the needed title names.

Best Regards,
- Victor

We created a listing with ACF (List and Detail Page) and want to extend the seach field searching for text in other fields than title. How to achive that?

Hi matandi

Thank you for choosing Filter Everything PRO.

The search field uses the default WordPress search algorithms.

If you want to extend it with the new entities, you will need to write custom code that will extend this logic with the necessary conditions.

For this, you can use the WP hook ”posts_search” to apply the required conditions – https://developer.wordpress.org/reference/hooks/posts_search/ For the needed post type.

Also, you can study the plugin code and check how the SKU search was added.

Best Regards, - Victor

Well, we already did that the wordpress search ist finding the fields, the plugin search field doesnt.

Please check how the SKU search is added to the plugin. It uses the custom field and works with its values. It will give you a good example.

Here is that code in case you can’t find it in the plugin:

add_filter( 'posts_search', [$this, 'addSkuSearchSql'], 10000, 2 );

    public function addSkuSearchSql( $search, $wp_query )
 {
        if( $wp_query->get('flrt_query_hash') || $wp_query->get('flrt_query_clone') ){

            if ( $wp_query->get('wc_query') === 'product_query' || $wp_query->get('post_type') === 'product' /* || $wp_query->get('post_type') === 'product_variation' */ ) {
                global $wpdb;

                $product_id = wc_get_product_id_by_sku( $wp_query->get('s') );
                if ( ! $product_id ) {
                    return $search;
 }

                $product = wc_get_product( $product_id );
                if ( $product->is_type( 'variation' ) ) {
                    $product_id = $product->get_parent_id();
 }

                $search = str_replace( 'AND (((', "AND (({$wpdb->posts}.ID IN (" . $product_id . ")) OR ((", $search );
                return $search;
 }

 }
        return $search;
 }

Best Regards,
- Victor

Hello.

Cookiebot finds thousands of pages that all need to be served the Cookie announcement. Thus the package that is needed from Cookiebot is heavily bloated.

How to stop the plugin from automatically forming urls for all possible combinations of filters?

Thank you.

If you have any other questions let us know.

Best Regards,
- Victor

Hey still,

Just for kicks, here’s a pretty search url for the project in question: https://www.intoo.fi/koulutukset/ala-digimarkkinointi

Which works, even though the pretty permalink is turned off via the define.

if you then, for example, use the filters to re-apply the “digimarkkinointi”-filter, the url gets updated to: https://www.intoo.fi/koulutukset/?ala=digimarkkinointi

Which, again, is completely fine.

Cheers.

We just contacted the development team about it. Indeed, the permalinks still exist even though the filters will generate the GET parameters. So far, there is no solution to turn them off completely, so they won’t work when using that code snippet.

Perhaps the development team will come up with a solution for it. When we receive any information on it, we’ll let you know right away in this comment thread.

Best Regards,
- Victor

Good afternoon.

1. How to remove darkening on a mobile phone (after filtering, the screen is darkened and you need to click).

2. Where to set the filter width (very narrow)

3. not displayed above the product grid

In widget settings set (Display horizontally. Columns: 3)

https://teplospektr.com.ua/product-category/teny-dlya-sushky-dlya-rushnykiv/

Hi teplospektr

Thank you for choosing Filter Everything PRO.

1) Please check this page for mobile mode – https://filtereverything.pro/resources/mobile-devices-new-approach/ it has popular issues and fixes to it.

2) Not exactly sure what you mean by that. The filter width is set to 100% by default, so if you place it in a container that is 100px in width, it will be 100px. If you place it in a container that has a width of 1000px it will be 1000px.

3) In order to display it above the product grid you should have either a widget area there, or you can use the shortcode, also you can use hooks from the page in order to place the filter shortcode in the needed area.

Best Regards,
- Victor

I loved your plugin, but I need to deactivate it, as it kills all the time the webserver database. There are again and again queries blocking the whole database server, which is not so bad at all. The server is very bored, as long as there are not queries like that (RegEXP values are anonymized here:

SELECT SQL_CALC_FOUND_ROWS K3xhZ_21_posts.ID FROM K3xhZ_21_posts LEFT JOIN K3xhZ_21_term_relationships ON (K3xhZ_21_posts.ID = K3xhZ_21_term_relationships.object_id) INNER JOIN K3xhZ_21_postmeta ON ( K3xhZ_21_posts.ID = K3xhZ_21_postmeta.post_id ) INNER JOIN K3xhZ_21_postmeta AS mt1 ON ( K3xhZ_21_posts.ID = mt1.post_id ) INNER JOIN K3xhZ_21_postmeta AS mt2 ON ( K3xhZ_21_posts.ID = mt2.post_id ) INNER JOIN K3xhZ_21_postmeta AS mt3 ON ( K3xhZ_21_posts.ID = mt3.post_id ) INNER JOIN K3xhZ_21_postmeta AS mt4 ON ( K3xhZ_21_posts.ID = mt4.post_id ) INNER JOIN K3xhZ_21_postmeta AS mt5 ON ( K3xhZ_21_posts.ID = mt5.post_id ) INNER JOIN K3xhZ_21_postmeta AS mt6 ON ( K3xhZ_21_posts.ID = mt6.post_id ) INNER JOIN K3xhZ_21_postmeta AS mt7 ON ( K3xhZ_21_posts.ID = mt7.post_id ) INNER JOIN K3xhZ_21_postmeta AS mt8 ON ( K3xhZ_21_posts.ID = mt8.post_id ) INNER JOIN K3xhZ_21_postmeta AS mt9 ON ( K3xhZ_21_posts.ID = mt9.post_id ) INNER JOIN K3xhZ_21_postmeta AS mt10 ON ( K3xhZ_21_posts.ID = mt10.post_id ) INNER JOIN K3xhZ_21_postmeta AS mt11 ON ( K3xhZ_21_posts.ID = mt11.post_id ) INNER JOIN K3xhZ_21_postmeta AS mt12 ON ( K3xhZ_21_posts.ID = mt12.post_id ) INNER JOIN K3xhZ_21_postmeta AS mt13 ON ( K3xhZ_21_posts.ID = mt13.post_id ) INNER JOIN K3xhZ_21_postmeta AS mt14 ON ( K3xhZ_21_posts.ID = mt14.post_id ) WHERE N=N AND ( K3xhZ_21_term_relationships.term_taxonomy_id IN (N,N,N,N,N) ) AND ( ( K3xhZ_21_postmeta.meta_key = ‘S’ AND K3xhZ_21_postmeta.meta_value REGEXP ‘S’ ) AND ( ( mt1.meta_key = ‘S’ AND mt1.meta_value REGEXP ‘S’ ) AND ( mt2.meta_key = ‘S’ AND mt2.meta_value REGEXP ‘S’ ) AND ( mt3.meta_key = ‘S’ AND mt3.meta_value REGEXP ‘S’ ) AND ( mt4.meta_key = ‘S’ AND mt4.meta_value REGEXP ‘S’ ) AND ( mt5.meta_key = ‘S’ AND mt5.meta_value REGEXP ‘S’ ) AND ( mt6.meta_key = ‘S’ AND mt6.meta_value REGEXP ‘S’ ) AND ( mt7.meta_key = ‘S’ AND mt7.meta_value REGEXP ‘S’ ) AND ( mt8.meta_key = ‘S’ AND mt8.meta_value REGEXP ‘S’ ) AND ( mt9.meta_key = ‘S’ AND mt9.meta_value REGEXP ‘S’ ) ) AND ( ( mt10.meta_key = ‘S’ AND mt10.meta_value REGEXP ‘S’ ) AND ( mt11.meta_key = ‘S’ AND mt11.meta_value REGEXP ‘S’ ) AND ( mt12.meta_key = ‘S’ AND mt12.meta_value REGEXP ‘S’ ) AND ( mt13.meta_key = ‘S’ AND mt13.meta_value REGEXP ‘S’ ) AND ( mt14.meta_key = ‘S’ AND mt14.meta_value REGEXP ‘S’ ) ) ) AND K3xhZ_21_posts.post_type = ‘S’ AND ((K3xhZ_21_posts.post_status = ‘S’)) GROUP BY K3xhZ_21_posts.ID ORDER BY K3xhZ_21_posts.post_date DESC LIMIT N, N /* Current SQL Query is filtered by Filter Everything plugin */

OK, so I cannot use your plugin anymore. Sad to hear. Otherwise I would have to order a standalone webserver with enough resources for hundreds of € per month just for a filter. Thanks.

Or is there a way to limit the # of filters to 5 or so? A script or so to do that?

Well, it depends more on the limitations of your hosting, we do not know what limits you have there.

We, as a support team, personally tested it on a hosting basic business plan which is close 15-20$ a month (1 core 2 GB RAM), everything working fine without any issues, and even more, we are using this plugin for our own projects. Which are not connected to the plugin support.

No there are no such features to set how many filters you can use at the same time.

Best Regards,
- Victor

Hello,

I posted a comment like a month ago because one of my sorting filters wasn’t working properly (pricing sorting with custom ACF field).

You told me this was because the field was text and not numeric, so I converted it to a numeric field with your instructions (created a new field, not just changed the meta key for the existing field) but I’m still having issues.

If you check this page: https://mae.coffee/price-list/#price-list-tabla and sort by price, it seems to work for the first couple pages of posts, but if I get to the last pages there are a couple items that have lower prices and are appearing at the end.

Can you help me with this please? Just sent credentials as instructed.

Hi creamen

The development currently checking the issue on the site. When we get information on it we’ll let you know right away in this comment thread.

Best Regards,
- Victor

It turned out that the problem was trivial. You created the sorting option as a meta key instead of a numerical meta key. We have changed it, and it is working now.

Best Regards,
- Victor

Awesome, thank you!

I have create a ACF group and setup a new Filter Set which is displaying ok however the “numeric range” has a slider for both the low and high (2 slides) to show everything in the middle however I need to create a filter for someone to slide the numeric ranger just to select the max and i don’t want to show the low range, can this be done please?

Also i cant see anywhere on how to make the titles bold for the filters, can you point me in the right direction pls

Hi jon872

Thank you for choosing Filter Everything PRO.

No, unfortunately, there is no mono slider, but as a workaround, you can simply hide with CSS the input fields, and hide the min slider, so you can have only visible max slider to move it. This will require custom CSS, you can place the CSS in the Filters -> Settings -> Experimental -> Custom CSS.

You can use the browser inspect tool to find the needed elements and their classes in order to use them for your custom CSS.

For example, you can check this site, and do whatever you want – https://prnt.sc/Qqj2woFpWArM you can see the exact classes that those elements have, and their specificity in order to rewrite them. You can change already applied styles, to see if this class is responsible for it or some with a higher specificity. With a bit of practice, you can make any changes on any sites, themes, plugins, etc. This is a general practice, not specific to our plugin.

Best Regards,
- Victor

hi , we pay for the plugin, but getting error Invalid license key. Please enter correct license key.

Hi TwoTreesStudio

Thank you for choosing Filter Everything PRO.

Please follow the instructions on this page: https://filtereverything.pro/resources/license-key-issues/#how_to_get_the_license_key to get the license key.

Best Regards,
- Victor

hello, I am a customer of yours and have a pro licence. I have created a widget with your filters and would like to make it work as a popup from mobile and tablet. Only it doesn’t work. Here you can see my page > https://decretoflussiitalia.it/profili/

I also followed your guide by inserting the shortcode but it doesn’t work. Can you help me?

Hi andreyellow

You need to display it on mobile. And in your CSS it is hidden in mobile more – https://prnt.sc/rxAfMVyFq5gY

You can check more information about the mobile mode here – https://filtereverything.pro/resources/mobile-devices-new-approach/

Best Regards,
- Victor

Hello, The filter started to conflict with the plugin https://permalinkmanager.pro/ When I delete the product-category base, go to the category and try to filter, I see a 404 error. When I deactivate Permalink Manager, everything works fine.

A few versions of Filter Everything Pro ago, everything worked fine.

Could you please bring back compatibility with this plugin and other WooCommerce slug removal methods. So that the filter doesn’t use the product-category base.

Thanks!

Hi payles

Unfortunately, the permalink manager pro always caused this type of issue, as it conflicts with the friendly permalink manager in the plugin.

You can try to use this code in order to turn off our permalink manager:

define( 'FLRT_PERMALINKS_ENABLED', false );

So all of the filtering particles will be added as a GET parameter.

Best Regards,
- Victor

Hi, Victor. Thanks for the tip.

I will try to contact Permalink Manager support as well. There are checkboxes in the settings for compatibility with other plugins. Maybe they will do it for Filter Everything as well.

Hi payles

Let us know if their answer was positive about it.

Best Regards,
- Victor

Hi, I have a problem with the links I generate. when I try to go to a page that contains the filter it does not appear. the link is the usual one but it does not work.

example: https://coppogioielli.it/catalogo/?categoria=orologi-u

it does not open the catalog with watches but with everything. Instead it should open only with the category “orologi-u”

Please help me :) thx Omar

Can you please send the credentials to the wp-admin dashboard following this document so we can check it?

Best Regards,
- Victor

Check if everything is working now, please. We added the piece of code in your code snippet plugin in order to use the same GET parameters as the Free version does.

Best Regards,
- Victor

thx a lot :)

by
by
by
by
by
by

Tell us what you think!

We'd like to ask you a few questions to help improve CodeCanyon.

Sure, take me to the survey