Code

Discussion on Filter Everything | WordPress/WooCommerce Product Filter

Discussion on Filter Everything | WordPress/WooCommerce Product Filter

Cart 15,714 sales
Recently Updated

Stepasyuk supports this item

Supported

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

8977 comments found.

Hi gtutgben,

Thank you for choosing Filter Everything PRO.

You can read about it here – https://filtereverything.pro/resources/brands-and-color-swatches/

Also, you should add all of the settings – https://prnt.sc/gYxUym0ZXtgN

Best Regards,
- Victor

I want the filter selection to be already “unfolded” as default view. Unfortunately I have not found a possibility in the settings. How can I implement this?

Current view when opening the page: https://share-your-photo.com/b5d7bb3ddb

Desired view: https://share-your-photo.com/58d5d6597f

Hi markusbln,

We can provide you with code that makes foldable filters open by default.

add_filter( 'wpc_folding_opened', 'my_folding_filters_opened_by_default' );
function my_folding_filters_opened_by_default( $filters_opened_by_default ) {
    $new_opened_by_default = [
        1041, // Filter ID
        300, // Filter ID
    ];
    return array_merge( $filters_opened_by_default, $new_opened_by_default );
}

But this code example changes the default filter status (when you open a page with them for the first time). If you open some or close the system will “remember” their status, and next time you will see the filter in the same status you saw it last time.

To make them always closed and require them to open whenever you open the page with filters needs some amount of code changes and unfortunately, we do not provide or debug custom codes under the CodeCanyon item support policy. You have to ask somebody experienced with PHP to help you with this.

We can only say that foldable filters use a cookie with the name ‘wpcContainersStatus’ to remember a filter status.

Best Regards,
- Victor

Hi, I’m having problems or I’m not understanding what’s wrong! I have a phytro with 2 types the second is Parent of the first. Marks and types. I use the WPML translator, in Portuguese original language, everything is fine. But when in the front-end I change the language the first filter Brand, does not appear!!! in PT https://prnt.sc/ol8FFIP-CPPU in EN https://prnt.sc/iM01RkOq_xJt

What am I doing wrong?

We have tried it on all available browsers including incognito mode. Maybe you have any restrictions by IP or Country or any other ones by who can enter on the login page? This is not the problem on our end.

https://prnt.sc/p16vClHz8wmp This is what the console shows a 403 error. 403 status code means that access to the requested resource is forbidden. The server understood the request, but will not fulfill it.

Best Regards,
- Victor

Security has been temporarily disabled to enter and verify. Wait for the solution.

Hi turisbike,

We have checked the site and here is the issue, since you are using “include” in one of the filters it will be saved to the language you are editing it in. Basically, if you edit in English it will save it for the English language and display it only for the English version.

The best way to fix the issues would be to create translations of filter sets by turning on this option in WPML settings – https://prnt.sc/TM5A7-seR_k4 to have the ability to do it. So basically you would need to create a filter set for each language and do the needed includes in each of them.

Best Regards,
- Victor

I’m trying to use Filter Everything to display a range of our ACF Number field, however the “Range” option is greyed out preventing me from selecting it.

I can select checkboxes, radio or select – but ideally need Range to be displayed.

Any tips?

Hi scott569,

Thank you for choosing Filter Everything PRO.

Please make sure that your ACF field is strictly numeric and does not contain any other data. You can check it in the database. Or for testing purposes create a new numeric custom field and apply it to any products/posts and test if it will work correctly, creating a new range slider by numeric custom field in the filter set.

Best Regards,
- Victor

Hello I have a filter by the square attribute, which can take values: 10-20, 21-27, 28-35, 106-130, etc. How can I sort them that way? Currently, with any sorting method, I get the following order: 10-20, 106-130, 21-27, 28-35.

Example: https://tramontana.com.ua/ru/kondicioner/

Is it correct to set the order directly in the code? Like this: update_term_meta(302, ‘order’, 1);

add_filter(‘wpc_terms_before_display’, ‘wpc_sort_terms_as_needed’, 10, 2); function wpc_sort_terms_as_needed($terms, $filter){ // pa_square – is desired taxonomy update_term_meta(302, ‘order’, 1); update_term_meta(307, ‘order’, 2); update_term_meta(308, ‘order’, 3); update_term_meta(309, ‘order’, 4); update_term_meta(310, ‘order’, 5); if ($filter[‘e_name’] === ‘pa_square’) { $newTerms = []; foreach ($terms as $k => $term) { $termOrder = get_term_meta($term->term_id, ‘order’, true); $term->menu_order = ($termOrder !== false) ? $termOrder : 0; $newTerms[$k] = $term; } }

// To sort in descending order
    // usort( $newTerms, \FilterEverything\Filter\EntityManager::compareDesc('menu_order') );
    // To sort in ascending order
    usort($newTerms, \FilterEverything\Filter\EntityManager::compareAsc('menu_order'));
}
return $newTerms;
return $terms;

Hi Igor_Shyshka,

Here is an example of the code:

add_filter('wpc_terms_before_display', 'wpc_sort_terms_as_needed', 10, 2);
function wpc_sort_terms_as_needed($terms, $filter){
    // pa_color - is desired taxonomy
    if ($filter['e_name'] === 'pa_color') {
        // Define the custom sorting order
        $customOrder = array(
            'red',
            'blue',
            'green',
        'purple'
        );

        // Create an associative array to store term objects
        $termMap = array();

        // Populate the term map
        foreach ($terms as $term) {
            $termMap[$term->slug] = $term;
        }

        // Sort the terms based on the custom order
        $sortedTerms = array();
        foreach ($customOrder as $slug) {
            if (isset($termMap[$slug])) {
                $sortedTerms[] = $termMap[$slug];
                unset($termMap[$slug]);
            }
        }

        // Add any remaining terms to the sorted array
        foreach ($termMap as $term) {
            $sortedTerms[] = $term;
        }

        return $sortedTerms;
    }

    return $terms;
}

and this is the results – https://prnt.sc/pYxJUGe6tXVM

Best Regards,
- Victor

Thank you very much for the answer. Your support is excellent as always.

Hi Stepasyuk, We are almost done setting up the filters. We are stuck with an issue :- Two of our filters have NA as values in them and they are selected by default. In chips, it shows as only NA which is confusing for the user. Can you help us add the filtername to it such as “Habitat: NA” or “Category: NA”?

I tried to find the answer for this in the comments and came across this function. I noticed that many users have requested for this. Can you kindly help?

function modify_chips_term_name($term_name, $term, $filter) { $modified_term_name = ‘Modified ’ . $term_name; return $modified_term_name; } add_filter(‘wpc_chips_term_name’, ‘modify_chips_term_name’, 10, 3);

Thanks so much Victor. It gave me a great start into hooks. I have modified the above code achieve the output I require.

function custom_chips_term_name($term_name, $term, $filter) { } add_filter(‘wpc_chips_term_name’, ‘custom_chips_term_name’, 10, 3);

if ($term_name === NA) { // Check the Term name        
    // Get the filter's slug
    $filter_slug = $filter[label];
}
else{
    return $term_name;
}
// Concatenate the filter's slug with the term name
$modified_term_name = $filter_slug . '-' .  $term_name;
return $modified_term_name;

Sorry, I’m not sure why the above function is not formatted properly.

Hi amith458,

Glad to hear that you have managed to modify it to your requirements.

Best Regards,
- Victor

Is it possible to have the filter widget on a different page than the results page?

For example: A dropdown vacancy widget on the homepage (with dynamic dropdown count) that sends the user to the /vacancies/ page, where the loop and posts are located?

I couldn’t find a way yet to do this within the current plugin features/options, since it requires the post loop to be within the same page as where the filter is displayed.

Thanks for the quick reply! I did not see the options hidden behind the ‘Apply button’ option, it makes sense now. Thanks, the plugin is amazing!

One more question: I have it setup and it’s working exactly as intended. The dropdowns adjust with AJAX on the homepage. However, if I log out from WordPress, the AJAX seems to stop working and it’s no longer passing the values in the URL either. I have no clue what’s causing this, there’s no additional console error.

This is the URL of our development site: https://pnocareers.cloudselling-dev.nl/

If you scroll down there is a widget with the fields ‘Sector’ and ‘Location’. When I’m logged in to my admin account, it’s working flawless. But logged out or incognito, it doesn’t work unfortunaly.

Hmm, we just tested it and everything is working well – https://prnt.sc/K_NXrxXL0QVX

Best Regards,
- Victor

Hello

Plugin seems nice, but the filtering on elementor pages dont seem to work. So we have archive template designed in Elementor PRO for a custom post type that we have, and we have set up filters for Languages, and States (both are ACF filters basically).

When we try to filter content on archive page, if ajax is enabled – it gives popup that system couldnt find the specified ID or CSS class for post container – even though we have provided that Post ID in both places – the plugin main settings and the filter settings. We tried both with ID and CSS class but same result, when ajax is enabled it gives that popup message, that it couldnt find the ID or CSS Class.

When Ajax is disabled, there is no popup, plugin tries to reload the posts based on filter, but nothing changes, no actual filtering is happening, it just displays the same posts.

Please advice. P.S. We have most recent versions of Elementor, Elementor PRO and Filter Everything plugin installed.

Hi Zrabo,

Thank you for choosing Filter Everything PRO.

You need to specify the correct query in the “And what to filter” in the filter set settings. About class or id, you need to open the needed page and check the container of your products/posts with dev tools inspect to understand what calss or id it is have.

In general, there is no support for accounts whose support period has expired following the support policy

But we can help you later after all requests from accounts with valid support periods will be processed. It may take some time – days or weeks.

If you want to get it faster, please extend your support period and this request will be processed in the first queue for supported accounts.

Best Regards,
- Victor

Hi Victor

Thank you for the response, appreciate it. I do know my period for support is expired. However, even though I purchased plugin like 9 months ago, this is the first time I install and used it.

I do have the correct query in settings, and both ID and Class was on the page when I checked it (several times).

So, It doesnt look like anything is wrong with my settings per se, but some kind of issue with the plugin.

Please advice. Thank you

Hi Zrabo,

Please send the link to the page with the issue so we can check it.

Best Regards,
- Victor

When selecting the popup version for the filter on mobile, it only shows the filter on the main shop of the page, not any other subcategory shops (woocommerce); When I disable the popup setting, it shows correctly on mobile as well; On desktop it shows at any time;

I have tried the compatibility mode, and any/all combination of relevant settings in the plugin; Nothing else works; I have also tried any/all possible paths for the filter… (The “where to filter” option)

Of course my goal is to have a working filter… Kind of amusing (in a very frustrating way) that the moment I purchase the “pro” version I start having problems with the functionality… As a note, right after updating the plugin with the pro version, it stops displaying anywhere, since the “where to filter” settings get bonked? Or I really don’t know

Usually, it can happen when this option is turned on – https://prnt.sc/DunBx2k_xqxs and you have a shortcode for the mobile button. But was it completely removed from HTML or just hidden? Or maybe some widgets area was hidden on mobile. This is a very weird behavior that never encountered before. We just tested it on our site and everything is working as well. Perhaps the reusable block was causing such behavior. Hard to give any advice, need to simulate the same situation in order to check it and find the root of the problem.

Best Regards,
- Victor

Dear Victor,

That option was never turned on in my case, so I do not think it has to do with it; I would have to recreate the bug in order to see if it was removed or just hidden from HTML.. I only added the reusable block AFTER it stopped displaying, in an attempt to fix it. Normally the filter block is inside the sidebar template part which I would add to the pages.

I am using the Spectra theme, and I have noticed some issues regarding the widgets area in the “customize” option for wp dashboard (in appearance) – (Your theme has X other widget areas, but this particular page doesn’t display). I have to manually copy the code from the widgets (in appearance) to the sidebar in template parts (in appearance -> editor) in order to get it to work.

However, that would mean that the widget area on mobile has a problem with product category pages of the shop but not with the main shop page itself, since I could always see the popup filter there.

Just a hunch, are there any settings that internally change when upgrading the plugin to PRO? (besides the options/settings that show up in the plugin settings) Since also, right after updating the plugin, the filter stopped showing anywhere, and I had to change the “where to filter” option to something else, save, and then change it back to the correct path as it normally was, in order to get the filter to display.

This is all that I can think of, I hope it can help you make a more conclusive decision; For now, it is working, and I don’t want to be stuck with it not showing up again; I will try to pay extra close attention and if it ever happens again I hope to have additional useful information for you

Hi amdxdbby,

The free version displays the filter set on archive pages, such as the shop archive page, categories archive page and etc. When you install the PRO version you can choose common WordPress pages + all Archive pages.

If you could provide credentials following this document it would be easier to check it and understand in which way you set up filter sets and where they should be shown and so on to provide more information.

Best Regards,
- Victor

PRESALES QUESTION – My client has a very complex e-commerce store. We are going to be building multiple taxonomies and custom attributes for the over 2.5K products.

The site is built with Beaver Builder

What is the strategy for implementing the “only show relevant filters” feature mentioned in your product description?

Can I dynamically add the relevant filter set to a single product archive page so that the store can be navigated through and the filters in the sidebar automatically change to reflect e.g. the category/product type?

Or do I have to either have multiple hard coded shortcodes (and rely on your plugin to only display the relevant one)?

Or is there some other approach which your documentation hasn’t covered.

The way this is implemented will be a key factor in deciding whether your plugin is the right tool for the job.

Many thanks

Hi michellemcdines1,

Thank you for your interest in the Filter Everything plugin.

“What is the strategy for implementing the “only show relevant filters” feature mentioned in your product description?”

It means that you can create unique filter sets and place them in the needed category. Basically can create one filter set for the electronics category second one for the furniture category and etc. So when you’ll scroll through different categories you’ll see different filter sets.

The shortcode only displays the filter widget, there is no possibility to create a filter set with a shortcode. In the filter set setting “Where to filter” dropdowns you can specify where the filter will be displayed.

Best Regards,
- Victor

So does that mean I have to create different archives or pages for each product category? What I am trying to achieve is a seamless transition so that as visitors navigate through the shop, the sidebar filters change automatically to the relevant filters for that product type/category.

Hi michellemcdines1,

No, you just need to create a Filter Set and place it in the needed category – https://prnt.sc/ihRtcIq7X3es then create another filter set and place it in another category.

Best Regards,
- Victor

Hi there, I have been using filter everything for a while and just purchased the Pro so that I can use the pop up widget on mobile, however the toggled filter container gets misplaced (Just above the products) compared to where the filter is when I deselect the pop up widget (aligned within the container). When on a category or tag page, this also means the heading of the tag appears above the filter. Please could you assist? winedrop.co.za/shop (as mentioned I have deactivated the pop up so will only see where the filter toggle is meant to be)

Another query is when opening the filter the odd dropdown is already expanded instead of toggled from time to time after clearing the cache – is there a recommended setting to prevent this with WP rocket? Thank you

Hi geoffreyb13,

It is important to keep in mind that the License key and CodeCanyon purchase code are two different things.

If you need to set the License key for the Filter Everything PRO plugin, simply head to Filters -> Settings -> License and click the “Get your License Key” button.

It will take you to a new page where you can log in with your Envato credentials (with an account where you have purchased the plugin) and obtain your License key.

It is a simple process but if are having any issues (automatically logging in with another account) simply use incognito mode in your browser.

Best Regards,
- Victor

Thanks Victor, I have done it. Can you tell me when we have the filter everything Pro plugin active, can we safely delete the original “Filter Everything — WooCoomerce Product & WordPress Filter” plugin?

Hi geoffreyb13,

Yes, when you install the PRO version active you can delete the free version of the plugin.

Best Regards,
- Victor

Hello, i install plugin GeneratePress, but SEO Rule dont work. Maybe you can say why dont correct working?

Yes, please provide the credentials to the wp-admin dashboard following this document so we can check it.

Best Regards,
- Victor

already sent the credentials

We have checked the site and the issue was in this option – https://prnt.sc/EPDmQG2rcohZ in order to make the SEO Rules work it needs to be turned off.

Best Regards,
- Victor

Hi, I need to show on my search page two dropdowns, each of them will include several specific tags. For example, one dropdown will be Date and another one will be Speaker.

In this way, the user can choose to see the posts that include the tag “july 2022” and the tag “Dr David Marsh”

Is it possible to do this using this plugin, PRO version?

Hi carmen-canada,

Thank you for your interest in the Filter Everything plugin.

Yes, it is possible, but you need to separate them, for example, choose tags to display only the “date” or the “name” because if you set up everything in tags there is no possibility to separate them and make two dropdowns. That’s why you can choose tags for example for the “date” and create a custom field for the “name” and create two filters with a dropdown (one by tag and the second one by the custom field) where you can choose the date in first and the name in second.

Best Regards,
- Victor

Hi! I’m having trouble with my filter! The filter works on the category and browse-all page, but on the tag pages, it just shows only tags for one post to sort by, no matter what tag I’m on.

This one is working: https://inkfoundry.net/browse/ This one is broken: https://inkfoundry.net/tag/happy-ending/

Hi ERINCAIR,

We have checked the site, and first of all, if you are using posts what was the need to simply make a duplicate of it as “cards”? Cards are not separate from posts, and second of all the issues that query is different on those tag pages. If you specify the filter to certain tag page it is showing everything correctly, but if you choose all it will show correctly only on the first page, the rest would be incorrect as the queries are not the same on them. You need to change the approach in order to make it work correctly.

We tested it on our page and it is working absolutely alright on the tag pages – https://prnt.sc/rVl6fCeqVC57 because the query is the same and it is all good.

Best Regards,
- Victor

I put cards in to try and troubleshoot the issue. I spent a few more days messing around. I’m not a developer, this is my first website, so I don’t entirely understand what’s going on most of the time. I think the issue is with the query loops on the archive page? By pure monkey-on-typewriter bashing I managed to make it work. It’s still not perfect as it doesn’t show the correct counter or correct empty terms, but it filters everything correctly even with the pagination, which you pointed out was an issue. How it works, I don’t know, but hey :) I’ll count it as a win! Thanks so much for your help, I love this filter!

Hi ERINCAIR,

Yeah, it should work normally as one query, but because of the way of implementation, it is working a bit incorrectly. We would just use simple posts on the clean WordPress installation. Without creating any cards and so on, since it would be enough for you to have the needed functionality. It would be easier to keep it updated and stuff.

Also, we wanted to drop a quick note to let you know how impressed we are with the progress you did in fixing those things, that is really amazing. Keep up the fantastic job!

Best Regards,
- Victor

Good afternoon, today I bought the Filter Everything Pro, I want to know how to change the values to the slider range

Hi reytmo,

Thank you for choosing Filter Everything PRO.

If you already bought the plugin, please write your request from the account where you purchased it.

Best Regards,
- Victor

Hi,

I have purchased the advance filter and i have hit a road block.

I setup the filter but then, i am stumped.

https://mylittlehealthstore.com/shop

already sent credentials

New issues, filter partially work. 1. product price slider and manual price selection does not work. 2. hidden categories is being shown. example “ingredients” are hidden, we use this for other functionality. 3. Product category and price is displayed side by side in two column, we need one column

1. We set up the price range slider (your prices are all 20 and one variation for 40) add more prices to check it.

2. We choose the option “Empty Terms” to “always hide” but you can go to the filter for more options and exclude the term that you don’t want to show.

3. Fixed as well, you choose that option in the Elementor with 2 columns.

Best Regards,
- Victor

After update to new loop grid in elementor, the filter not work

ex.

https://dev.banklider.com/paneles-solares/compania_paneles_solares-holaluz/

first block, old archive post + template plugin

second block with new loop grip + template elementor, not work

¿?

Hi dgcintas,

Go to the filter set setting and in the “And what to filter” choose the correct query. Please note that the plugin is working with the query.

Best Regards,
- Victor

Hello,

I’ve encountered a new FE bug on my site.

The filter no longer works: both the product categories and the price range no longer filter the page.

Can you please help me? Here’s the link to the page where the filter is: https://www.bmakeyounice.be/boutique/

Thanks Alessio

Done! Thanks :)

Hi afancello,

We have checked the site and changed the query in the “And what to filter” to the second one and everything is working. When you make some modifications on the filtered page, and so on, you might change the query as well, so all you need is just go to the filter set setting and specify the correct query, and hit update.

Best Regards,
- Victor

Thanks a lot for your help!

I already bought another license, but it doesn work. I can´t save the filter configuration 10a409e5-da32-493a-8210-9e2f522d2fd0 PLEASE FIX IT ASAP

https://emprendevillaitalia.com

Hi raixen,

Thank you for the credentials. We have checked the filter set and added a test filter and save the configuration and everything is working. Maybe the issue is that you are trying to add the filter with the same meta key or URL prefix then you will get an error – https://prnt.sc/MwhyfPeQ8-NP after hitting the update button.

Best Regards,
- Victor

It works ok because wpuserfrontend is on version 3.6.4. But if you update wpuserfrontend to version 3.6.7, filter every thing stops working. Take a look now.

Hi raixen,

We have checked the site, and we would be happy to help with the issue. But this is not a bug in our plugin but in the WPUF plugin. The thing is that the code there is written in such a way that it does not check for the presence of tinymce, but tries to call its method.

We would suggest asking WPUF support to fix this issue.

Best Regards,
- Victor

Hello, how can I buy multi-licence? I need this plugin for about 15 maybe 20 sites, but to buy that number of licences per 40 USD each is a bit too much for me. Can you offer me please some pricing rules? Thank you very much.

Hello Xtrodinary.

Thank you for using the Filter Everything PRO.

Please, write me PM and I will provide you with details how to get multi-license.

Thank you. Regards.

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