Code

Discussion on Filter Everything | WordPress/WooCommerce Product Filter

Discussion on Filter Everything | WordPress/WooCommerce Product Filter

Cart 16,183 sales
Recently Updated

Stepasyuk supports this item

Supported

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

9140 comments found.

I have a lot of filters that are similar, can you add a function in one of the next versions where the filters can be copied?

I think I’m not the only one who feels this way. that would save a lot of time.

Hi dwinger

Thank you for your suggestion.

Sure, such feature is already planned and it waits its time in my development schedule. I will let you know here in this comments thread, when it will be ready.

I have variable products and I make a filter to choose size (I have clicked on Use for Variations) and it shows me the sizes but also shows me the products that are out of stock in that size (in stock has other sizes). How do I block the out of stock ones from showing? I tried the Stock status filter but customers didn’t like it and had complaints.

Hello aeragr

Thank you for using Filter Everything PRO.

In general this can be solved with additional filter by Stock status but as I understood you don’t like such filter. In this case you can add specific sub-query to the filtered Product query to display only In stock products. I can help you to write such query, if you provide me with credentials to your /wp-admin in accordance with this document Please, let me know.

I’m sorry that you got such impressions about support. I usually try to answer as quickly as I can. But right now I’m in the hospital and I don’t have enough powers to process all the support requests on the same day they were sent. That’s why I set support status Away.

I’m sorry, I didn’t know. I hope you get well soon. I just sent the credentials.

Hello aeragr

Thank you for the credentials.

Please, provide me also with link to the page with filtering results, where you expected to see products with “In stock” variations only, but this does not work. Optionally in PM.

Thank you. Regards.

Hello, I’m finding an odd issue with your software, when I have a filter called color and products with the word color in the beginning of the permalink URL like /product/color-black-light-replacement, the link fails to display correctly and in fact acts like a standard post type vs a product post type.

I’m not sure how this is happening yet with how you handle the filter URL Prefix, but I did allot of testing and found if I change the filter link to something like product_color then the product displays just fine.

Yet looking at all the links, there is no other URL Prefix called color, but if that slug name is in the beginning of the URL of the standard slug / permalink. Then the display fails for any product that has the name in the beginning. It tries to display the product by showing a 404 error in the title, yet displays the product as a standard post type without the product metadata.

I removed all plugins and narrowed this issue down to just your plugin, please set this test case yourself and you will see its handling permalinks / URL Prefix oddly.

The issue can be solved by making sure none of the URL Prefix has any beginning names that are the same with any other slug. The issue is there are ZERO duplicates, so I’m sure that is not the issue either.

So please look at your logic on how you handle this and let me know if you understand the issue and/or need additional information. Again this only happens when the URL Prefix name is in the beginning of other permalink / slug URLs. It seems to be using a like search which is conflicting with how everything is handled globally.

Hello ingenuitor

Thanks for the report. Yes, I am aware of the existence of this problem. But this is a conscious decision do not limit users to chice desired prefixes. Usually, when somebody reports that some of their posts not working due to this problem, I recommend to change the prefix or slug depending on what works best in their situation.

I thought about adding a code that checks for slug matching with prefixes, but it needs to be checked for all post types slugs as well as taxonomy term slugs. And you need to do this check in both situations – when creating or editing a new URL prefix, and when creating and editing any post or any taxonomy term slug. It’s pretty high-load code and that’s why it’s holding me back from implementing it for now.

Thanks for the info though. If I add such the code, I’ll let you know here in this comment thread.

Can you make your slug/permalink a standard type, that I can find in post types somehow or standard taxonomies slugs, then I can find this inside my link manager, which will handle duplication issues without other issues on any slug/permalink used.

It does become hard to hand manage 50,000+ links without good tools, but the main issue I found here is it’s not a one to on match duplication, it’s seeing a beginning keyword as the conflict, not a true duplication issue.

So the way it’s programmed now, is seemly flawed and requires a workaround like making sure the beginning of the slug/permalink is not a keyword in any other slug/permalink used.

i.e. a filter slug/permalink called favorites should not conflict with a post slug called favorites_are_mine but in practice, it does, the slug/permalink called favorites_are_mine tries to display the standard blog post type and not the post type that was set, which was a product post type.

That is the main issue here. If you fix that issue, then everything else just requires common sense, if you understand the hierarchy of how everything works as you can not have any duplications.

Please do not add more logic if you can, in fact try in remove what is not needed, less is always more, using the standards will allow me to solve issues like this faster.

Please let me know your thoughts and all the best.

Hello ingenuitor

If you mean to specify some pre-defined prefixes I can’t do this because every plugin user has own ideas about what prefixes should be in their case.

But from other side if you want to check if some prefixes can match to your existing post slugs, you can open Filters -> Settings -> URL prefixes and you will see all existing prefixes on your site. And you can check them or globally edit suspicous prefixes to avoid conflicts.

I definitely will improve this moment in the plugin, but for the moment I can’t say you for 100% how exactly it will be done. Because to make decision I have to spent some time to check different ways how to make it better.

Hello,

When I deactivate the plugin, the Woocommerce product category pages display fine, but when I activate the plugin it takes me to a 404 error. Why could this happen?

URL product cat example: https://test-plugin.ionserver.link/tienda/categoria-producto/anillos

(I previously contacted you about another issue and you already have access to the WP dashboard)

Thanks for your help.

Hi Stepasyuk,

I found the error. I was putting as prefix of the URL of the product category filter the same of Woocommerce product cat. I changed it and it works correctly. Thank you.

Hi alinnovatr

I’m glad that your issue is already solved :-) Thank you for your notification about that.

Hi, I’m using your plugin to filter portfolio categories. I checked to make sure filtering works properly before adding AJAX. It works without AJAX just fine. When I enable AJAX and choose one of the filters, it refreshes using AJAX, but all of the portfolio items are invisible. I can click them, but they’re invisible. If I refresh the filtered page then they show up properly, but if I click any of the filter options they’re invisible again. I have the correct CSS class wrapper selected. See test page here: http://bit.ly/3K0ZPk2

Hi delisha15

Thank you for purchasing the plugin.

You have classic issue related with JavaScript events attached to dynamically loaded content. Here is common description of the problem and how to solve it in common details – https://filtereverything.pro/resources/ajax-related-problems/

Also the content on the page is hidden behind the password and I can’t check it. You can optionally send the password via PM.

Thanks Stepasyuk, I read that page several times before sending my original message. Those seem like very good instructions for experienced JS devs like yourself, but I’m not a JS dev. I’d need more detailed instructions, like where to put that code? Should I be updating your plugin code files or my theme files? Is there a snippet that you can share that I can paste into mine? I sent you my site’s password in a PM. Thanks!

Hello delisha15

Sure, I understand you.

To to avoid inflated expectations from support here, I want to inform you that such custom coding is not within the scope of support for items here on CodeCanyon. I can only give advice on how to solve this or that problem of compatibility with third-party features. But unfortunately I cannot provide you with an example code. This is not something that is included in the support price, which is included in the price of the plugin.

Many websites contain a lot of different JS features that designed without support for dynamically loaded content and it is impossible to provide simple and universal solution for all them. In every such case it should be solved individually.

Optionally if you can not make them compatible, you can consider whether to use AJAX in Filter Everything or to use that JS feature like Fade In effect or Lazyload for images that stops to working after AJAX loaded.

Hi, can you tell me if the filter already works with Bricks Builder? Regards, Tatiana.

Hi TetianaMarketing

I’m glad to inform you that I already fixed issue with Filter Set for common categories pages and Bricks Builder. Now the plugin works with Bricks Builder as with any other page builder.

Hello!

I can’t solve the problem, the filter by custom category is not sorted by A-B-C alphabetically, when the names are in Ukrainian, the names with the letter “i” are not sorted

Thank

Привіт, AllYavorsky

Дякую за використання плагіну. Надалі продовжу англійською, щоб було зрозуміло для решти користувачів.

Please, provideme with link to the page with this issue. Optionally you can send me credentials to your /wp-admin in accordance with this document I will check it myself.

Thank you.

Hello, is it possible to embed the plugin/widget inside a php template?

Hello giessedati

Thank you for your interest in Filter Everything PRO.

Sure, it is possible. You can insert Filters widget as shortcode anywhere on your site. For example:
<?php echo do_shortcode( '[fe_widget]' ); ?>

Nice! would it be possible to show/hide filters with a button if I use the horizontal orientation?

Hello giessedati

Yes, sure. It is also possible. I can provide you with code example in terms of the plugin support if you will purchase PRO version.

Thank you. Regards.

Collapse button works for all iPads in portrait mode – SOLUTION for me is: /all tablets portrait/ @media screen and (hover: none) and (orientation: portrait) { body.wpc_show_open_close_button .wpc-filters-widget-content:not(.wpc-opened) { display:none; } .wpc_show_bottom_widget .wpc-filters-open-button-container, .wpc_show_bottom_widget .wpc-filters-widget-controls-container, .wpc_show_bottom_widget .wpc-filters-widget-top-container, .wpc_show_open_close_button .wpc-filters-open-button-container { display: block; } }

I don’t know if it’s 100% correct, but for me works OK… Because some iPads on retina didnt collapse in portrait mode even after plugin update…

Hello anoagency

Thank you for your recommendation.

If somebody asks me to force filters to switch in mobile mode for some specific devices I recommend them to change mobile breakpoint value for the plugin. It can be achieved with this code:
add_filter( 'wpc_mobile_width', 'my_custom_wpc_mobile_width' );
function my_custom_wpc_mobile_width( $width )
{
    $width = 1180; // new desired breakpoint in px. If you want to use it only in portrait iPad mode please change to 820
    return $width;
}

If your code works for you, you can leave it as is. But also you can try to use my code example, which is more reliable.

i have a store with eight main categories. on the category page, only the subproduct categories should be available as filters.

currently i have 8 filters and include the matching categories manually and display them on the respective category page.

can this be simplified so that only the subcategories are automatically displayed, depending on the category where you are?

Hello diekonkr

I recommend you to use Product categories widget or Menu item in addition to the Filters widget with filter by Categories. In this case when visitor selects any category it will be directed to the page with products from this category only and filter by Category will not show any extra categories (in case if you set “Empty filters – Always hide”)

But if such structure is not good for you, you also can modify Categories list in the filter by using hook ‘wpc_terms_before_display’ – https://filtereverything.pro/resources/hooks/#terms-before-display-hook

It allows you to specify what exactly terms will be shown in the filter and you can add condition that if parent category is selected, then to remove all extra categories and show children only.

where can i see my filter set id? can’t find them for the shortcode

Just open the Filter Set in edit mode and look please on its URL. You will see there post=xxxx that xxxx is Filter Set ID. Please, see example – https://prnt.sc/brzRGU8bclh4

I was the one who requested a refund for the plug-in earlier, but after checking again, it seems that your plug-in is sufficient. Therefore, we will cancel the refund request.

Thank you for developing such a great plugin. Have a nice day!

Hello falling0

Sure, no problems. Thank you for your notification and I wish you to enjoy with the plugin capabilities.

Thank you for developing such a great plugin. Unfortunately, this plugin doesn’t exactly match the features I’m looking for.

I’m sorry, but I think it’s better to find another solution. Please guide me on what process to go through to get a refund.

thanks.

Hello falling0

I’m sorry that you were not satisfied with the plugin. Please, create a refund request via appropriate form in your account and it will be processed as soon as possible.

Thank you. Regards.

Good afternoon! The price filter on the home page doesn’t work. The other filters work fine on the main page, the filter “_sale_price” also works on the main page. The filter by price works on the store page, but not on the main page of the site. Can you tell me what it may be? All the settings are correct.

Tried to make a copy of the home page and installed the same filter-set there. The price filter and other filters on the copy of the home page work fine.

https://dev.flowry.ru/ login:flory / password:flory

Hello mitinegor

Unfortunately I have no access to sites in *.ru domain zone due to russian government restrictions and I can not provide support on sites there.

Hi,

Yes, my support has expired (buying more licenses soon when my project goes into production) but I think I have identified a bug in the plugin. When the base url (the part before the filter parts are added) ends with a numeric string, that numeric string is removed from the url in the filter hrefs. This makes the filters not work.

So let’s say the base url is ‘https://domain.com/posttype/taxonomy/1234/' then the ’/1234’ part gets removed, making the filter href ‘https://domain.com/posttype/taxonomy/filter-value/' when it should be ‘https://domain.com/posttype/taxonomy/1234/filter-value/'. When the filter is clicked the AJAX call returns a 404 because the url doesn’t exist.

I’ve traced it down to /src/UrlManager.php line 190. There you remove page and comment pagination from the url on lines 188 and 189, and have a broader regex on line 190. When I comment that line, the issue is fixed.

Could you please tell me if you would consider fixing this in an update?

Regards, Bas

Hi Bas.

Thank you for your report.

For the moment I have no plans to change it because for example Elementor pagination has the same URL scheme with numbers in the end. Please, see example – https://demo.filtereverything.pro/elementor/3/

I would like to use pattern {/page/N} to remove only pagination links but it will not be compatible with Elementor. That’s why I recommend you do not use numeric slugs for your posts or just to hardcode Filter Everything PRO on the site that uses numeric slugs if there is no way to avoid them.

Thank you. Regards.

After installing new update to wordpress, I get the following error ‘Invalid licence key’.

Hello moshef3

It’s very strange, but are you sure that this message was produced by the Filter Everything PRO plugin? Because my plugin shows such error message only as answer when you try to register your license key. Did you try to register your license key again on Filters -> Settings -> License tab?

Hello! Thank you for the plugin. I have a question – I am using two language versions on my website: English and Hebrew. I am filtering Woocommerce products by meta key _airconditioner. The Meta Value is Air conditioner. I need to see the content of the meta value Air conditioner in the filter widget on the English version without any changes, and on the Hebrew version – מזגן. I found the code to do this, but it did not work. Can you help? add_filter( 'wpc_filter_post_meta_term_name', 'wpc_custom_term_name', 10, 2 ); function wpc_custom_term_name( $term_name, $entity_name ){ // $e_name is meta key in our case // $term_name is term value stored in meta field in our case if( $entity_name === '_airconditioner' ){ $term_name = 'מזגן'; } return $term_name; }

I solved the problem. Just add ?reset_filters_cache=true to the URL. Thank you for the excellent plugin!

Is there any hook to change Filter Title by Meta Key? For example, I created a filter set with different filters, each with its own Filter Title. And for each version of the site, I want to display my own Filter Title. Thank you!

Hello maxim-belenkiy

I’m glad that your first problem were solved by yourself. About filter title – you can change it via hook ‘wpc_filter_label’. Here is example of how this hook works:
$filter_label = apply_filters( 'wpc_filter_label', $filter['label'] );

Also if you use WPML or Polylang you can create translated Filter Sets. Please, see here how to do that – https://filtereverything.pro/resources/with-wpml-polylang/

Hello! Bought your plugin. We have 2 problems: 1. We cannot activate the license, writes an error 2. Filter problem with h1 headers. If you go to a category and do not use a filter, then 1 product is taken from the list and substituted

and about the filter in the category. A question from our programmer : https://ibb.co/fHPtXpW how do I know that a filter is selected? Headers are output by this code when just the category needs “111111” when there is a filter then “2222222”

The filter in the category has been sorted out. Please help me with the error when entering the license number

Hello seigemsk

Unfortunately I can’t help you with activation site in *.ru domain zone. If there is no connection between this site and license server I can’t do nothing with this. And the reason of this problem are restrictions were made by kremlin.

You may create refund request and to get your money for the plugin back. It’s all that I can offer you in this case.

Hi, I installed ACF and filtereverything.pro to filter for added fields. I was able to create the filter with my ACF Fields. But there are 2 things I don’t get through.

1) During the first tests I selected wrong FilterBy options. So I deleted the old and created new ones. Now I get the info that the URL Prefix is already taken. Can I clean that mess up?

2) I added true/false fields in ACF. Now I want to overwrite the default 0/1 output by some text. I already stepped into the hooks, but these seem to not work in all cases. I added each one after the other and it seems only one is really working:

function wpc_modify_taxonomy_term_name($term_name, $e_name) { $term_name="ok".$e_name; if (in_array($e_name, array('wandern_kinderwagentauglich'))) { $term_name = "test"; } return $term_name; } add_filter('wpc_filter_post_meta_term_name', 'wpc_modify_taxonomy_term_name', 20, 2 ); add_filter('wpc_filter_post_meta_exists_term_name', 'wpc_modify_taxonomy_term_name', 20, 2 ); add_filter('wpc_filter_post_meta_num_term_name', 'wpc_modify_taxonomy_term_name', 20, 2 ); add_filter('wpc_filter_taxonomy_term_name', 'wpc_modify_taxonomy_term_name', 20, 2 ); add_filter('wpc_filter_author_term_name', 'wpc_modify_taxonomy_term_name', 20, 2 );

...

If you have a look on https://koenigskinder-ausflugsziele.com/wandern-mit-kindern/ziele-und-touren you can see that this overwrite is only working for the hook “wpc_filter_post_meta_exists_term_name”.

What am I getting wrong here?

Thanks in advance!

To Point 2: It seems I have to save the ACF Group after I change the code for the hook. Then the code is executed…

Hi ys-thorsten

Thank you for purchasing the plugin. I’m glad to meet here person who are so experienced in coding :-)

1. To avoid predefined URL prefix you have to delete this filter in all existing Filter Sets. If it was the only one Filter Set, where you created such filter, please delete filter and update your Filter Set. After that you will not get predefined prefix.

2. If you created Custom Field Exists filter based on your true/false ACF field the only ‘wpc_filter_post_meta_exists_term_name’ will affect on this filter. Because every term name hook works for specific filter type only. So such behavior is expected.

Hi,

Congrats for your super-plugin!

Is there any possibility to select some filtersets in widgets to keep them uncollapsed?

By default the filters in shop page all collapsed with pop-up setting in mobile view.

I have another filter-set set in homepage with labels and submit button. Is there any way or extra shortcode arguments to keep it un-collapsed and not be replaced by filter-button in mobile view?

Thanks in advance Khris

Hi Khris

Thank you for using Filter Everything PRO.

In general it is possible by CSS adjustments for the Filters widget that should not be collapsed on mobile devices. You can access to the CSS properties of such widget via unique class it contains. For example ”.wpc-filter-set-2460” where 2460 is Filter Set ID.

And to make Filters button to open only desired Filters widget on mobile, you can disable automatically inserted Filters button in Filters -> Settings -> Experimental -> Hide opening widget buttons

And after that to insert Filters button via shortcode https://filtereverything.pro/resources/shortcodes/#open-button and specify Filter Set ID that should be opened.

Hi there, we just bought your plugin and want to use it with avada. Well, in general it is working finde, but if we filter on a category page build with avada, the variable products selection does not work anymore. klick here: https://dev.beevisible.de/shop/alle-produkte/ As you can see, the barbaresco 2020 is available in 3 formats but only 2 are in stock. Now use your filter for 2020 and yes, it is filtering correct but the stock check, the “choose variation” buttons and the add to cart are broken. Hope you can help!

Besides that issue, the “Filter by Price” is also changing its look after user one of the filters.

Hi generics

Thank you for using Filter Everything PRO.

I’m not sure, but I guess that these problems were on the page, when you used AJAX for filtering. If yes, it means you have classic problem described here – https://filtereverything.pro/resources/ajax-related-problems/

And you have to re-init all JS events on your page after content was loaded by AJAX or consider to use filtering with regular page reload after selection every filter.

Unfortunately the common way to make all JS events compatible with dynamically loaded content does not exists and that’s why I can’t add it to the plugin. And in every such case it should be solved individually for a site.

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