Code

Discussion on Filter Everything | WordPress/WooCommerce Product Filter

Discussion on Filter Everything | WordPress/WooCommerce Product Filter

Cart 15,682 sales
Recently Updated

Stepasyuk supports this item

Supported

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

8967 comments found.

I have set my first level categories to show only subcategories. The plugin is set to only filter by product attributes, yet there are still filters visible on the categories with “Show only subcategories”. What do?

1) A couple of words on how this (show only subcategories) is working under the hood. In fact, those pages also contain WP_Query and select products from the database. They are simply not displayed in the template, only the subcategories are displayed, but the sampling itself is carried out. Therefore, the filters correctly show the numbers of the products on this page. So as we mentioned you can hide it with CSS.

2) We’ll explain it in a simple way.

Think of a URL as a web address. It helps your web browser find and display the right page on the internet. Now, imagine you have a website, and you want to create a new web page with a URL like “category-something.”

But here’s the problem: some other parts of your website or plugins already use the word “category” before the dash ”-” in their URLs. So, when someone tries to visit “category-something,” your website might get confused. It won’t know if they want the new page or something else related to the existing “category.” and you get 404.

To avoid this conflict, you need to be careful when creating new URL prefixes and make sure they don’t use the same words that are already used by other parts of your website or plugins. This way, your website will work smoothly.

We understand that it might look like, oh why they just don’t use the same thing over again, it would be logical. No, it is not working in this way. It is crucial to understand how each piece is working together without conflicting.

Best Regards,
- Victor

About the 404 and naming issue:

URLs get matched with exact text, not partial text. It will never ever, in an adequately designed system, match with expressions such as SQL’s ‘LIKE’, ‘SUBSTRING’, ‘LEFT’, ‘RIGHT’, aka partial match. I tested some more cases, and it looks like your validation is not working!

1) I have a filter with slug ‘barcode’, if I try to create a new filter with the slug ‘barcode-another’ I will get an error, but now let’s try something else: If I had a filter ‘apples-bananas’ and tried to create a new one with slug ‘apples-bananas-carrots’ – there will be no error I but when using the filter/visiting URL – it will cause a conflict and return 404. So no, the naming scheme is not the problem; your matching is! It’s good that there is such validation, it’s not good that it doesn’t work.

Check this snippet from PLUGIN_DIR/src/Admin/Validator.php:
*// @todo fix bug, when $prefixesList is not array*
public function validatePrefixHyphens( $prefix, $prefixesList )
{
    if( strpos( $prefix, '-' ) !== false ){
        if( is_array( $prefixesList ) ){
            $pieces = explode('-', $prefix, 2 );
            $firstPart = $pieces[0];

            if( $exist = array_search( $firstPart, $prefixesList ) ){
                return false;
            }
        }
    }

    return true;
}

When you explode the string, you set a limit ($limit = 2 argument) so you only get the first part, but you compare it to a list of entire prefixes, so to put it into an example: $prefix = “apples-bananas-carrots”; $pieces would become: array( [0] => “apples”, [1] => “bananas-carrots”) $firstPart would become: “apples”

And inside the array search you’re searching for “apples” inside [“apples-bananas”, “apples-another” ... ] – essentially never matching and returning false in the cases where the prefix contains more than one hyphen.

2) Matching substrings left and right like that can and will cause a lot of other problems for no obvious reason and this makes the plugin a huge compatibility risk. Could you please explain to me why the hell is your url matching working like that?

3) Why are filters’ slugs saved as options in the WordPress system, rather than using the values in the post object? Every filter is a post and is listed on the WP_posts table, why is it’s prefix ultimately stored in WP_options?

Hi ickomcdevill,

Thank you for bringing this to our attention. Your input is highly appreciated, and we will ensure that your valuable feedback is promptly forwarded to the development team for review.

Best Regards,
- Victor

Hi, our plugin license is blocked, can you activate it, please?

code purchase 91e4d6e2-8f5e-47ab-a49a-fa5a1c74b58f

Alright, so the license is already activated on two sites, that’s why you can not activate it on the third one. We can deactivate it across all of the sites so you can activate it on the needed ones. Tell us when you are ready for it.

Best Regards,
- Victor

Ok, please, deactivate it from the sites and we will activate it wherever. Thanks

The license was deactivated across all of the sites, so now you can activate it on the needed ones.

Best Regards,
- Victor

Hi, great plugin. I just have a small problem here: I need the filter for a custom post type that is not public and doesn’t have a public archive. Unfortunately, Filter Everything does not recognize custom post types set to non-public. Is there a way to solve this via code snippet?

Since you didn’t respond to my question, I just wanted to know if it is possible. If possible, I will renew support to get the solution of course.

Hi simplebird,

We’ll get back to it when we finish with all of the active support members issues.

To check if it is possible or not, would require more information and time that it might look, and it would require the crendentials as well following this document

Best Regards,
- Victor

Subcategory filter not working correctly

When I filter the subcategories, it always shows the same products that the parent category groups together, but it does not filter them. I have checked the filters and cannot find the fault.

For example:

main1
—-sub1
—-sub2
—-sub3

main1 has products that applied to the main1 category (all products from all subcategories)

sub1 has products that applied to the main1 and sub1 category

sub2 have products that apply to the main1 and sub2 category…

In this case, if you use “AND” logic, then choosing the main1 in the filter will show all of the products from this category, then if you also choose sub1 it will show only products from the sub1 category because products from the sub1 category are applied to the main1 and sub1 categories, this is how “AND” logic works “main1 and sub1”

Best Regards,
- Victor

yes, I understand. I was asking you if it was possible to make a filter for categories and another filter for subcategories because the names of the subcategories are long and when displaying by hierarchies (which I need) the menu is displayed towards the right side and they get together a lot the texts. I imagined that they could be displayed downwards only like accordion tabs or similar. If I choose dropdown, it no longer respects the hierarchies and mixes the categories with the subcategories.

Hi Montecor23,

Ah, now we understand what you were trying to achieve. Unfortunately, there is no option to apply a category filter to both the parent category and its subcategories simultaneously. However, you can add two separate filter sets on the same page and use the include and exclude options as a workaround. However this is not a normal solution, so we suggest using any attribute instead of a parent or subcategory. And creating two filters, one by category and the other by attribute, in this case, they will be separate and independent.

Best Regards,
- Victor

Hi there – my license code is:

63f24dd4-672b-4607-9c45-b57ebdd90e3e

I set it up and it’s all working etc – I have just one filter set with two filters in it – this was all good – using ACF custom field and a taxonomy that I setup – again – all working as expected but now not

I then moved the order of the filters and now the website just doesn’t show the filters – I moved them back again to the original order and still doesn’t show

website is a staging site – here’s the domain:

https://staging-incapablestaircase.kinsta.cloud/

I am using Wordpress with Oxygen Builder

Hello me again

license is – 63f24dd4-672b-4607-9c45-b57ebdd90e3e

I re-installed the plugin and still getting issues:

I have ACF with a post type of hosts – inside that there are field groups etc

I have a repeater in oxygen that shows the dynamic data

this is all working

for filter everything I have setup a filter set that looks for custom post type fields

I have set the main filter to NOT hide anything

the two main custom fields the filter should show are days of the week and genres

currently it only shows the labels for posts that contain a field of that type

wheras it should be showing all filters as I have set this to NOT hide them if they are empty

so filter everything is reading the filters from the posts its just not showing all of them when it should be

second issue is that when I click one of the filters it just shows a blank page and not the results

this is the website (staging site):

https://staging-incapablestaircase.kinsta.cloud/ everything was working yesterday and after I moved the order of the filters in the back end it all went wrong and even now after I uninstalled everything, cleared cache, re-signed shortcodes etc in Oxygen – even saved permalinks again like you suggest in docs

its broken

please help !

go to the website and click on Jelly Wobble – you can see that her day of the week is ‘Friday’ and on the home page it lists Friday as one of the filters – but when you click ‘Friday’ teh page goes to this url https://staging-incapablestaircase.kinsta.cloud/day-friday/ – and the page is blank

again – was all working fine and now completely broken

P.S. I have setup the settings to say ‘commone Wordpress Pages’ and ‘homepage’ as that’s where the posts are listed

When I do this on the ‘and what to filter’ – it shows ‘No WP queries match…....’ etc

which doesn’t make sense as there definitely are posts on that page with that query – and on the front end teh filters are showing – albeit broken and not working

Hi bitfunk001,

The answer was provided here in this comment thread – https://codecanyon.net/comments/30105022

As we mentioned there is some issue with that home page.

Best Regards,
- Victor

Hi,

I have installed the FIlter Everything Pro plugin. My goal is to filter product categories based on certain attributes. You can find an example of what I intend to achieve at https://www.furlongflooring.com/flooring/carpet

Seun O.

Hi Seun

Unfortunately, we do not have any demonstrations or other stuff like that. As a support team, we are responsible only for the current plugin functionality. Not about extending current functionality.

But if you want to better understand how it is working we suggest you check PluginPro.php and WpManager.php files. There is no 1 file or line where it takes all of those things and just filters it, logic is separated across all of the files as each piece is working with the needed functionality.

You can experiment with the plugin, but we cannot help you with creating the custom functionality that you are looking for, we can only provide basic information on it, and where you should look for it. Those files from above you can check them and understand what is going on there in order to create something that you need. As we previously mentioned there is no one line of the code where it is all working.

Best Regards,
- Victor

Hi Victor,

I appreciate your effort in providing all the necessary information required to allow me use your plugin achieve the desired results for my current set up. As a matter of fact, I followed one of your earlier instructions which at the time wasn’t too clear. However, after I gave it another read, it became apparent to me what I needed to do to achieve the filtering. Long and short, I’m happy :-) to say that I’ve been able to successfully adapt your plugin to address the concerns I previously raised.

Thank you, Seun O.

Hi seuno8

We are more than happy to hear that you managed to make it work for your case. You did a fantastic job!

Best Regards,
- Victor

Hi, I have a problem activating the license. I dont see the key anywhere, only the purchase code which is: 0998c689-ac96-4900-b91b-1964667ed73e

The license is for the https://climatecommshub.com/

Hi 47hg59vrhg,

Please check this page in order to understand how to get the license key – https://filtereverything.pro/resources/license-key-issues/

Best Regards,
- Victor

ok, now its working

Hi 47hg59vrhg

We are glad to hear that everything is working.

Best Regards,
- Victor

Hello, Filter is not working in the product categories.

I have created a Product Archive Page, for Product Categories.

Checkboxes show up but filter doesn’t work.

Please check: https://pmediaweb.com/dev/meatholic/product-category/australian-wagyu/

You must have misunderstood something. Here – https://pmediaweb.com/dev/lamaisonaire/products/product-category-chairs/ you have products that are applied to different categories like cair table and so on.

Here – https://pmediaweb.com/dev/meatholic/product-category/australian-wagyu/ you have products that applied to this product category page. Apply other categories to them and you could filter them as well.

Best Regards,
- Victor

How to accomplish that in this case?

Let’s try to explain in another way, the link with tables and beds and other that you presented have products that are from different categories, from table category and bed and other – https://prnt.sc/NbsxZx6mWIBh

Your page has this – https://prnt.sc/Pl1beGVN0JwU 3 products with a Wagyu category, what do you want to filter with category filter on this page? Please explain it to us. If those products have only the Wagyu category, and you have a filter by product categories.

Best Regards,
- Victor

Is there a way to get a list/data of all SEO rules? Any accessible functions available?

If you go to ‘edit.php?post_type=filter-seo-rule’ you are presented with the current seo rules.

You have several columns, The first one is a select column, the second one is named ‘title’ then ‘rule id’ then ‘post type’

I want to access a list of ‘titles’ (urls) via php.

Well here is the code example of how you can get those titles:

function display_filter_seo_rule_titles() { $args = array( 'post_type' => 'filter-seo-rule', 'posts_per_page' => -1, // Retrieve all posts of this type ); $custom_query = new WP_Query($args); if ($custom_query->have_posts()) { echo '<h2>Titles of "filter-seo-rule" Posts:</h2>'; echo '<ul>'; while ($custom_query->have_posts()) { $custom_query->the_post(); echo '<li>' . get_the_title() . '</li>'; } echo '</ul>'; wp_reset_postdata(); // Restore the original post data } } // Hook the function to a WordPress action add_action('wp_footer', 'display_filter_seo_rule_titles');



They will be shown in the site page footer like this – https://prnt.sc/KJrCO0yfI6Dv

Best Regards,
- Victor

Perfect. Thank you. I was able to use this data to create an XML sitemap automatically for Google to use.

Filtering not working with pagination

Even if I put a parent container that includes everything ajax on pagination still not works. Maybe because we are using custom div and classes on paginate links? What pagination classes trigger the ajax effects? Example links: viesseauto.com or whatandif.com and many others…

Discussion here: https://wordpress.org/support/topic/filtering-not-working-with-pagination-2/#post-17167075

Okay, now everything is working, can you please provide your version of the AJAX pagination which was not compatible with our plugin? Or, do you want when the AJAX option is turned on, to force the pagination to update products with the AJAX as well?

Best Regards,
- Victor

the second one. i want to force pagination when ajax is turned on

In that case, the mystery is solved and we can close it. The plugin has nothing to do with pagination, and it doesn’t care what type of pagination you use on your site. All it does is apply filter terms to show the required products. Therefore, your pagination and our plugin are two separate entities that do not intersect, and our plugin cannot make your pagination work with AJAX.

If you want to update products with AJAX, you must write this functionality for your pagination.

Best Regards,
- Victor

Hi,

Purchase code: 639f3fd7-24bb-4d89-81d7-bf0cf9b4cd63

I can’t see the widget in the elementor pro dashboard?

Thanks, Michaela

Hi Michaela,

Thank you for choosing Filter Everything PRO.

In Elementor you can find in in the “WORDPRESS” area (dropdown/section) You cannot find it with Serach as it is strictly the Elementor feature – https://prnt.sc/nXUmA2RT_0T6

Best Regards,
- Victor

Is there a way to show some indicator (like a spinning cycle when to search is performing? Maybe there is already but it does not show at all.

False alarm! I have to enable using Ajax in Settings to have this when performing search.

Hi Panosgrth,

Thank you for choosing Filter Everything PRO.

We are glad to hear that the issue was resolved.

Best Regards,
- Victor

Hey there again, I think I found a tiny bug in your plugin. I have a filter set that uses AJAX, with a text search field and two taxonomies. I set the option to hide empty (tax) terms on the initial filter layout. When I now type in some text into the text search field that yields no results, both taxonomy filters show ‘N/V’ instead of the (greyed-out) taxonomy terms. If I pick ‘never hide’ for empty terms on the filter set options, of course those empty terms show up. Is this a known bug? Since it’s not the ‘initial filters’ when I type text that doesn’t exist in any posts and get the zero result, I’m just ever so slightly confused.

Hi Victor,

thanks again for getting back. It would be good if you could change the ‘N/V’ to ‘n.v.’ for the German translation. I know I can do it myself through translation files/plugins, just asking for the sake of correctness of your plugin. :-)

As for the feature, you’d have an even more intense fan here if you implement it. In fact, the project and client I am using my license for is probably not the happiest to have the plugin behave as currently when filtering. I considered it a bug, since the logic behind it struck me as weird, hence my report. But I understand you can’t implement this right away. So thank you for considering it, you must have a lot of bugs and features to work on on a regular basis. ;-)

All the best Eno

Hi enoversum,

We have added it to our list. And will notify you here when it is released. About the N/A or n.v. as in your case, currently, it is not possible to redeclare in roder to change the class, this possibility will be added soon with the next updates.

Best Regards,
- Victor

Hi Victor,

thanks again for your care, I’ll be happy to receive the info once it’s released. And I already found out there is no way to hook into that function at the moment. I’ll try to relay the info to my customers on whose project I am using your plugin.

Again, thanks for all your help, really appreciated!

All the best

Eno

i try your free version and go to buy pro , but what is chip ?

Hi lenka2014,

Thank you for your interest in the Filter Everything plugin.

If you go here https://demo.filtereverything.pro/product-category/clothing/women/color-red/brand-hm/c-kind-dress/?max_price=100 you will see those options – https://prnt.sc/uOg2CbcCTRdG those are the chips.

Best Regards,
- Victor

oh yeah i see it, it is amazing, how to display a special Filter Set Only special page ?

With the PRO version, there is an option “Where to filter” where you can specify where you want to place the filter set.

Best Regards,
- Victor

Hi,

I’m using your plugin to filter my products on a “Product category” page template on DIVI.

Is it possible to dynamically display only the child product categories of the current page, like the WordPress “product category list” widget does?

Also, I can't activate my License key for automatic updates. When I add the key, I get an "Unkown error" message...

Thanks in advance for your help.

Olivier

Hi boutiquebusiness6,

Thank you for choosing Filter Everything PRO.

To ensure that only child categories are displayed in the filter widget on the current category page, make sure that the products belonging to those categories are placed only in the current category and all of its child categories. If any product has additional categories, it will also be displayed in the filter.

It seems that your server does not allow connection with our license server. We can activate it on our side, but we need the following things from you:

1. Credentials to your /wp-admin following this document
2. And your license key.

Please, send all these via PM.

Best Regards,
- Victor

Hi Team, I’m interested in categorization links, such as these here on Airbnb: https://guesthook.com/airbnb-categories/ if you see on airbnb website, you can click on the link and it appears to share a new sort of the archive. I can not tell if your filtereverything has the same capability to ‘sort by single link’ this way, but please let me know! Thank you so much for your patient support. Here is a link to airbnb – you’ll hopefully see the top row of categories quite clearly. https://www.airbnb.com/?search_mode=flex_destinations_search&category_tag=Tag%3A5348

You’ll see categories ‘National Parks, Amazing Views, Tiny Homes, Beachfront’ etc. at top row, enabling users to click the link by category. I’d love to send you a picture if that is not clear. Thank you always.

Actually – nevermind, I’ve figured out the solution. I established ACF as ‘checkboxes’ and left FilterEverything as ‘Radio Button’ and it provided me the option to list radio buttons in link form with multiple radio selections per post. Thanks for all your help.

Hi norainu87,

Great job! It’s wonderful to hear that the issue has been resolved.

Best Regards,
- Victor

Hi, I was looking through the comments but couldn’t find my issue: Is it possible to filter search results by post type? Let’s say my search query includes ‘pages’, ‘products’, would it possible to provide a filter option for the different post types? I can add filter options within the post type, but I just want to filter by pages and products.

Hi happycamperdude,

Thank you for choosing Filter Everything PRO.

A bit confusing what you want to achieve. You can filter by one post type, which you choose when you are creating a filter set. Search should correspond to this post type, not just ?s=someText as it will by default find posts pages and products. Should be like ?s=someText&post_type=product

You can place a couple of filter sets on the page for different post types, but if the filters are the same it might show incorrect counters and some other issues might appear.

Best Regards,
- Victor

We are experiencing an issue with Sorting ACF fields on a custom post-type archive page. Page link here: https://stgcoffintrout.wpengine.com/rolex-at-coffin-and-trout/rolex-collection/

The size and material filters work perfectly.

The style and dial filters see that there are posts that contain data attached to the ACF but, when selected, returns no results.

Would you take a look and let me know if there is something that we might be missing?

Hi JohnScottDixon,

Thank you for choosing Filter Everything PRO.

Please check this page about ACF what issue it can have and how it can be fixed – https://filtereverything.pro/resources/acf/

Also, this might be a URL prefix issue, if the URL prefix is the same as some slugs in Woo it might be instead of 404 showing no products. Go to filters -> settings -> URL prefixes and change them to the unique ones.

Best Regards,
- Victor

It was a duplicate ACF Field in the database. Thank you so much for your help!

Hi JohnScottDixon,

We are glad to hear the that issue was resolved.

Best Regards,
- Victor

Hi love your product but cannot make it work, purchased pro and just want to filter normal post categories and tags on a wordpress page using elementor. Getting error message : There are no filters in the Filter Set yet. Please add them to the Filter Set related to this page. here are the screenshots with the settings https://mysam.ai/wp-content/uploads/2023/10/filter-everything-elementor.png 2 https://mysam.ai/wp-content/uploads/2023/10/filter-everything-error-message.png 3 https://mysam.ai/wp-content/uploads/2023/10/filter-everything-settings.png thanks

Hi peacecity,

Well we can provide you with an official page from the WP documentation – https://developer.wordpress.org/reference/classes/wp_query/

In general, when you create for example a page with let’s say Eelemntor you have elements like Posts/Products and then you choose in the query setting of that element which post type to display there. It will be your query.

Archive pages have the same WP_Query as in the official documentation, a bit modified.

Best Regards,
- Victor

our goal is simple: we want to filter post categories and tags using elementor here is what currently shows when clicking on what to filter https://mysam.ai/wp-content/uploads/2023/11/query-filter-everything.png how can we set it up so we can filter through categories and tags from standard wordpress posts? thank you Victor

Hi peacecity,

In “Where to filter” you should choose your custom page if you created it with Elementor like “page” + “My page name” or if you want to place it on the archive page choose “common WordPress pages” + “all archive pages”

Best Regards,
- Victor

Hi there!

Not sure if my first comment appeared. We just purchased FE to filter our blog posts on one page and all of our pages on another. It looks great so far, but the filter itself isn’t working with our page builder. The counters all show 0 and the filter doesn’t allow for users to click on anything. I’ve looked at a ton of tutorials on how to have the filter work with Elementor-type builders, but it just doesn’t seem to take. Would you be able to remedy this for us?

Thank you!

Hi immunizationeconomics,

Thank you for choosing Filter Everything PRO.

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

Also please provide additional information, what filter, on which page, and link to it, so we can check everything right away.

Best Regards,
- Victor

Thanks Victor! I just sent over the credentials.

Hi immunizationeconomics,

We set up the filter set on that certain news page, and set the correct query in the “And what to filter” Also we set up the AJAX container in that filter set settings in “HTML id or class…” input. So you can test it now.

Best Regards,
- Victor

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