Code

Discussion on Filter Everything | WordPress/WooCommerce Product Filter

Discussion on Filter Everything | WordPress/WooCommerce Product Filter

Cart 15,658 sales
Recently Updated

Stepasyuk supports this item

Supported

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

8952 comments found.

I created a filter on the site for the months of the year, but they didn’t rank properly. So I renamed them 01 January, 02 February, ... etc. At first all the months with the original name showed up and at the same time with the new name, so I deleted all the posts and restored. Now nothing is showing up at all. It seems to me that it is somehow indexed wrong in the database.

Hi kuczys

If you had custom fields and applied the data on some posts, and now you deleted all of the posts, then there are no posts with the data in those fields and you see nothing. Perhaps that’s the issue. Or maybe we understand you not correctly.

Best Regards,
- Victor

Another admin deleted them on a try while I was working on them. This is resolved, sorry, my bad. However! There is still an entry in the filter that has already been deleted(overwritten). Additionally, I disabled displaying values where the count is 0 and that is the one item in the filter where I overwrote the name.

If you are working with ACF or other plugins that create custom field, most of them have the same issues – https://filtereverything.pro/resources/acf/

Best Regards,
- Victor

Hello, I bought your plugin and still have 2 problems. I would like to filter the lists from the plugin (https://directoriespro.com/documentation/ ), which I haven’t been able to do so far, and I would like to filter the locations by distance. Is this possible? This page is about https://vt-stage.com/ Veranstaltungstechnik-jobs/ Thanks

Hi Ambros

Thank you for choosing Filter Everything PRO.

Provide more information about the distance that you are talking about, it this some type of dynamic value? Or does each post have a custom field with distance data?

Best Regards,
- Victor

Hi Victor,

Each post has geodata (address). I need an address field with distance settings. As in this search https://vt-stage.com/ Veranstaltungstechnik-jobs/

Thank you

Oh alright now we understand, when choosing a city you can choose a radius. No, unfortunately, there is no ability to create such a filter. Only by custom code.

Best Regards,
- Victor

Hi, how can I sort numeric values in a filter? https://prnt.sc/-KZdRHq3nWgS

The A-B-С option does not work correctly.

Привіт, як я можу відсортувати числові значення у фільтрі? https://prnt.sc/-KZdRHq3nWgS

Варіант “АБВ” не працює коректно.

Вітаю spacetheme,

The issue here is that those values are not numerical, they are string values (text), you can use manual sorting and you have two code examples that you should rewrite for your needs, one working with filter term slugs:

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; }


The second one is working with the filter term names, which is more comfortable, please note it is case sensitive:

// FE SORT FILTER TERMS MANUALLY add_filter('wpc_terms_before_display', 'wpc_sort_terms_as_needed', 10, 2); function wpc_sort_terms_as_needed($terms, $filter) { // Define custom sorting orders for different meta keys $sortingOrders = array( 'meta_key_goes_here1' => array( 'Text1', 'Text2', '1', '10' ), 'meta_key_goes_here2' => array( '8', '12', '90', '8T', '8 T', '18T', '40T' ), // Add more meta keys and their sorting orders as needed // 'another_key' => array('term1', 'term2', 'term3'), ); // Check if the current meta key has a custom sorting order if (isset($sortingOrders[$filter['e_name']])) { $customOrder = $sortingOrders[$filter['e_name']]; // Create an associative array to store term objects $termMap = array(); // Populate the term map foreach ($terms as $term) { $termMap[$term->name] = $term; } // Sort the terms based on the custom order $sortedTerms = array(); foreach ($customOrder as $name) { if (isset($termMap[$name])) { $sortedTerms[] = $termMap[$name]; unset($termMap[$name]); } } // Add any remaining terms to the sorted array foreach ($termMap as $term) { $sortedTerms[] = $term; } return $sortedTerms; } return $terms; }


Best Regards,
- Victor

Well if it is not working you can check the documentation page here – https://filtereverything.pro/resources/hooks/#terms-before-display-hook and read about this hook and how to work with it.

Best Regards,
- Victor

I’m a long-time user of FilterEverythingPro. Just a few days ago, with my purchased license, everything worked without problems. However, now I am faced with the problem of activating the license key. The previous activation was reset and when reactivated it says that I have the wrong license key. I have not made any changes or updates recently that would cause this issue, so I am asking for your help in resolving this issue.

Hi Quimron

Thank you for choosing Filter Everything PRO.

Please check this page for typical issues with the license key – https://filtereverything.pro/resources/license-key-issues/

Best Regards,
- Victor

Filter is not displaying on page. I have created a page that has a section of products on it. “Part’s & Accessories”. When I add it onto the page it displays ” No one Filter Set is related to this page. “

I have set the filters to display Product Categories -> Parts & Accessories

What to to filter is set to Product Query. Main Query.

How do I set it so it filters the right products?

https://recreationalpowersports.com/shop-accessories-copy/

Hi depthincolour

Thank you for choosing Filter Everything PRO.

Well the link that you attached to the message, is sending us to the page template, not the category page. So you need to choose in “Where to filter” “pages” + “my page name” or if it is a main shop page choose “common WordPress pages” + “shop”

Best Regards,
- Victor

Thanks for this! I managed to fix the error! One more question though… I have it on a page with a loop grid in elementor pro. The filters are showing up but it doesn’t seem to be filtering the items in the loop grid here is a link to view the issue: https://recreationalpowersports.com/shop-accessories-copy/

Hi depthincolour

Go to the filter set setting and in the “And what to filter” choose another query hit update and check if it is filtering everything. Do not forget to refresh the page before trying to filter again if it is working or not.

Best Regards,
- Victor

The filter does not appear to work when you have an ACF relationship field with multiple values selected.

For example: If I have an ACF relationship field tied to a taxonomy. I can’t select multiple categories. Let’s say I have a custom post type of “contact” and in the the ACF relationship field that uses post categories. I cannot select multiple categories and use the sort filter on that ACF field.

Hi OneLDesigns

Thank you for choosing Filter Everything PRO.

You should apply custom fields on the posts not on the taxonomy, because our plugin is filtering posts, by a taxonomy, custom fields, tags, and so on. It doesn’t filter taxonomies, so if you apply a custom field on the category “shoes” and want to filter it, you will have absolutely zero reaction.

Best Regards,
- Victor

Pagination wont show, everything works great, ajax also works great and filters properly…

$args = array( ‘post_type’ => ‘listing’, ‘posts_per_page’ => ‘9’, ); .........

<?php echo paginate_links( array( ‘base’ => str_replace( 999999999, ‘ # ’, esc_url( get_pagenum_link( 999999999 ) ) ), ‘total’ => $query->max_num_pages, ‘current’ => max( 1, get_query_var( ‘paged’ ) ), ‘format’ => ’?paged= # ’, ‘show_all’ => false, ‘type’ => ‘plain’, ‘end_size’ => 2, ‘mid_size’ => 1, ‘prev_next’ => true, ‘prev_text’ => sprintf( ‘ %1$s’, __( ‘Newer Posts’, ‘text-domain’ ) ), ‘next_text’ => sprintf( ‘%1$s ’, __( ‘Older Posts’, ‘text-domain’ ) ), ‘add_args’ => false, ‘add_fragment’ => ’’, ) ); ?>

Hi StainOnRug

We are sorry to hear that, but our plugin is not responsible for pagination. Please note, that we do not provide od debug custom codes. As a support, we are only responsible for our plugin functionality.

Best Regards,
- Victor

hi, i purchased your filter and i have some question, by the way the code is 960cf94c-e57a-469d-ad6f-59b028dcc7c5 if you want to check. firstly i need to filter a page where there are many loop-carousel, and i want a filter that filter all of them simultaneously and i cant, also i have problems in using filters with radio buttons, i cannot drag them to select an interval and also if i write manually the ammount it doesen’t filter anyways. secondly i want to ask about the grafic party, i also want to filter based on date, that are written in a format that is usefull fot coding but not aesteric, there’s a way to change the visualisation of it? and also i want to ask you where i can learn to show better the filter, purely grafic based

Hi neverstoppartyingvenice

1) By default, the filter set works with one query, not two or more. What you can do is place multiple filter sets on the page with absolutely the same filters. But in that case, counters will be not correct, so better turn them off.

2) Can you please provide more details on “i cannot drag them to select an interval and also if i write manually the ammount it doesen’t filter anyways” What do you mean by interval? and amount with dragging?

3) The date filter should be released anytime soon, right now you can only write some type of custom code for it to display like you want.

4) You can write your own custom styling for the filter using custom CSS. To find the needed classes use browser inspecting tools and choose the needed elements of the filter.

Best Regards,
- Victor

Hi,

I was wondering if it’s possible to enable the collapsible filter widget on tablet. Now it’s only enabled for mobile, but I would like to use this also for tablets. Maybe in the future it would be cool to have it on desktop as well.

Best regards,

Simon

Hi simager1

Just change the breakpoint for the needed values, place this code in the functions.php:

add_filter( 'wpc_mobile_width', 'my_custom_wpc_mobile_width' );
function my_custom_wpc_mobile_width( $width )
{
$width = 1180; // new desired breakpoint in px.
return $width;
}

Best Regards,
- Victor

Sent the credentials for the license issue

Hi randycaruso

Please send the license key as well via PM.

Best Regards,
- Victor

I am using Filter Eveirything Pro with WPML but I cannot get it to actually translate the filter titles. I have set WPML settings as per the support doc https://filtereverything.pro/resources/with-wpml-polylang/ . WPML translation manager runs the translation and credits are used but the filters dont show. The translated filters appear empty when checked in the additional languages and when I try to click the pencil to edit I get taken to a page on front end and got this ” Product Filter

a:16:{s:23:”search_field_menu_order”;s:1:”1″;s:23:”apply_button_menu_order”;s:2:”10″;s:12:”wp_page_type”;s:15:”common___common”;s:15:”wp_filter_query”;s:2:”-1″;s:10:”hide_empty”;s:3:”yes”;s:17:”hide_empty_filter”;s:3:”yes”;s:22:”custom_posts_container”;s:0:””;s:16:”use_search_field”;s:3:”yes”;s:18:”search_field_label”;s:6:”Search”;s:24:”search_field_placeholder”;s:0:””;s:17:”apply_button_text”;s:5:”Apply”;s:17:”reset_button_text”;s:5:”Reset”;s:22:”apply_button_page_type”;s:17:”no_page___no_page”;s:22:”apply_button_post_name”;s:17:”no_page___no_page”;s:10:”show_count”;s:2:”no”;s:16:”use_apply_button”;s:2:”no”;} ”. I have tried adjusting WPML translation settings etc but have the same result everytime. Have made sure to completely remove translations before attempt to recreate. 1 Thing I saw on one of the supports implied have to recreate filters sets for each language.

Hi antonys19

If you did everything correctly you should have two filter sets, or more depending on how many languages you have, and in each filter set you use another title for filters.

Best Regards,
- Victor

Hi Victor

As I mentioned the translated filters set are empty. There is no filters within the translated filter sets and therefore no translated sub titles for the filters. I The actual filters product categories are correct but the indifdual filter titles are still in English.

Regards

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

Best Regards,
- Victor

Hi, I hope you can help me once again. I have now my search online under https://www.brooot.de/rezeptsuche/ and all works pretty nice. Only thing is the sorting of filter values. I need it to be sorted like I have added it to the ACF settings of each field. I have left the setting without sorting, but it does not work. And sorting by ABC is not senseful here. What to do?

OK, still not working: used metakey as $filter[‘e_name’] and added the field values in $customOrder

You need to replace ‘pa_color’ with your meta key and use the slug names of your terms to create the sorting order that you need.

Alternatively, you can try this code, it works with term names and Case sensitive:

// FE SORT FILTER TERMS MANUALLY add_filter('wpc_terms_before_display', 'wpc_sort_terms_as_needed', 10, 2); function wpc_sort_terms_as_needed($terms, $filter) { // Define custom sorting orders for different meta keys $sortingOrders = array( 'meta_key_goes_here1' => array( 'Text1', 'Text2', '1', '10' ), 'meta_key_goes_here2' => array( '8', '12', '90', '8T', '8 T', '18T', '40T' ), // Add more meta keys and their sorting orders as needed // 'another_key' => array('term1', 'term2', 'term3'), ); // Check if the current meta key has a custom sorting order if (isset($sortingOrders[$filter['e_name']])) { $customOrder = $sortingOrders[$filter['e_name']]; // Create an associative array to store term objects $termMap = array(); // Populate the term map foreach ($terms as $term) { $termMap[$term->name] = $term; } // Sort the terms based on the custom order $sortedTerms = array(); foreach ($customOrder as $name) { if (isset($termMap[$name])) { $sortedTerms[] = $termMap[$name]; unset($termMap[$name]); } } // Add any remaining terms to the sorted array foreach ($termMap as $term) { $sortedTerms[] = $term; } return $sortedTerms; } return $terms; }


Best Regards,
- Victor

Works perfect. Thanks.

Can I used it to filter the products by Vendors store (wcfm) in the multi vendor woocommerce?

Hi 7thSon47

Thank you for your interest in the Filter Everything plugin.

If you mean that you want to place the filter widget on the custom vendor store page then not at the time, but should be added soon, or at least there will be information in a couple of days on how much time it would take to implement this. If no, then it should work perfectly fine.

Best Regards,
- Victor

I want to add “Select Vendors” on the filter list on any product grid/list.

If visitor select a vendor name, then the product list will be showing only from that selected vendor(s)

Hmm, you can create a filter by the author, as vendors are simple users and it should work.

Best Regards,
- Victor

HI support Before buying the pro version, i have installed the free version on a testsite. I have one question, how to setup this step by step filter. I have a parent filter and want to open child filters depending on the the chosen parent filter value ex parent is brand an for each brand there a different filters. All filters are ACF fields

Hi skysolution

Thank you for your interest in the Filter Everything plugin.

There is no such functionality to create a step-by-step filter depending on which term you choose. It is only possible with custom coding.

Best Regards,
- Victor

Hi.

I have a question for your plugin. I’m setting it up for this site: https://www.spatec.no/massasjebad-ny/.

When filtering, the page refreshes, and you are sent to the top of the page. Is it possible somehow to stay at the same “level” of the page? In this case below the video on top?

Hope to hear from you soon :)

Regards, Christian

AJAX request returns 403 error () – https://prnt.sc/u_u4AzaCJ5pI when trying to remove the GET parameter with price settings. This is strictly server or site settings.

HTTP 403 Forbidden is a standard HTTP status code regarding the HTTP server’s handling of a client request. It is sent by the server to the client and indicates that the server understood the request, but will not fulfill it due to internal restrictions.

Best Regards,
- Victor

Hi again.

And thanks again for your effort. The support at the webhotel seems to have figured it out. Apparently it was the ? at the end of the url that triggered some kind of safety rule and prevented the request. Now it seems to work fine :)

Regards

Hi Christian

We are glad to hear that the issue was resolved.

Best Regards,
- Victor

Hi ! I bought a license for this very good extension. I did all my tests and settings with “Local” on my computer. Today, I’m technically ready to develop my site in production but I can’t get my license back… Can you help me? Thanks in advance Dominique

Hi rastarakette

Thank you for choosing Filter Everything PRO.

Can you please provide some more details, about what’s actually not working? License error? Is it an invalid license, or unknown error, or already activated on two sites? So we can provide the support ASAP.

Best Regards,
- Victor

Hello? I’ve been waiting for an answer for a while now…

Hi dresseditfb

Please note that the support is not working during weekends.

Best Regards,
- Victor

Hey there, Having a license issue for purchase #1d8c7dc5-f6e8-4db7-bcd2-c90548a56602.

Was off the project for a bit, and now coming back I’m hit with the following: “You have been using the plugin for over two months without a license key, and it is now locked.”

When I enter my license # I only get “Unknown error.”

Turned off all the plugins, basic theme, still stuck. Any advice?

Thanks!

Hi randycaruso

Thank you for choosing Filter Everything PRO.

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.

Please, do not forget to add the license key to the PM.

Best Regards,
- Victor

Hello, see in comments stated that FE had internal cache. how to clear FE internal cache automatically ex: using hook, wp-cli?

our problem is after doing onsale update , regenerate product lookup but still need to update Filter set although no changes made. Thanks

Hi dgdonline

Yes, you can do it with a function, here is the code example:

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

Or you can add this on your let’s say shop page this addition in the URL:

?reset_filters_cache=true

So it will look like this: mysite.com/shop/?reset_filters_cache=true

Best Regards,
- Victor

Thank you

Hello, I am interested in purchasing the Pro version, however I have a couple questions. First, is there a way to add the sorting element into the same mobile popup as the rest of the filters? Second, I cannot find the “Hide empty Filters” option in the free version. Does that option only appear in the paid version? Third, have you ever tested this with the Flatsome theme? Please let me know. Thanks

Hi cdshubert

Thank you for your interest in the Filter Everything plugin.

1) Technically sorting widget and filter widget are two separate widgets. Sorting widdget needs to be created in the widget area, of course, you can display it with a shortcode, but creating it and setting it up only in the widget area. You can place the sorting widget shortcode on the hook to display in the pop-up menu but this is not recommended.

2) Yes, the PRO version has this option.

3) We haven’t tested it by ourselves, but a lot of our customers are using that theme, so there should be no issues.

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