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.

9143 comments found.

Hello, I need some help. I use the plugin: Custom Post Types, Taxonomies and Fields for Avada Builder to display Custom Portfolion posts. I have used wordpress own custom fields to create more fields. Unfortunately, Filter Everything only works with the category filter that comes directly from the theme / wordpress. Not with my custom fields. The site is https://entwicklung.mueller-tiefbau-ak.de/work/

If I set the filter to my custom field “Weight” (Gewicht) no posts are displayed at all….

Please help!!!

Hello enestrix

Please, install the Query Monitor plugin, try to filter by paramter that does not work, open in Query Monitor tab Queries and find there SQL query with words /* Current SQL Query is filtered by Filter Everything plugin */ Copy this SQL-query here and let me know how many rows were selected with this query. I think it will explain, why the filter does not work.

Hello!

I have installed the plugin and for my understanding, that should actually work.

It is interesting that Filter Everything probably does the query correctly. If I set a filter, then the number of objects found decreases. That’s what I would expect.

Unfortunately, I still see but no more posts on the page although according to the filter chips posts are available.

So the filtered result is not displayed as “Post”. Am I missing something at one point?

Would it be possible for you to have a look at it?

Thanks a lot so far!

The query:

SELECT SQL_CALC_FOUND_ROWS lncApJsnG_posts.ID FROM lncApJsnG_posts LEFT JOIN lncApJsnG_postmeta ON ( lncApJsnG_posts.ID = lncApJsnG_postmeta.post_id ) LEFT JOIN lncApJsnG_postmeta AS mt1 ON ( lncApJsnG_posts.ID = mt1.post_id AND mt1.meta_key = ‘gewicht’ ) LEFT JOIN lncApJsnG_postmeta AS mt2 ON ( lncApJsnG_posts.ID = mt2.post_id ) WHERE 1=1 AND ( lncApJsnG_postmeta.meta_key = ‘gewicht’ AND mt1.post_id IS NULL AND ( mt2.meta_key = ‘gewicht’ AND CAST >= ‘9’ ) ) AND lncApJsnG_posts.post_password = ’’ AND ((lncApJsnG_posts.post_type = ‘baumaschinen’ AND (lncApJsnG_posts.post_status = ‘publish’ OR lncApJsnG_posts.post_status = ‘acf-disabled’ OR lncApJsnG_posts.post_status = ‘private’))) GROUP BY lncApJsnG_posts.ID ORDER BY lncApJsnG_postmeta.meta_value+0 ASC LIMIT 0, 12 /* Current SQL Query is filtered by Filter Everything plugin */

Hello enestrix

In this case I can only say that some problems are in your theme code that displays these posts. If they are selected correctly from DB but did not displayed on the page, it mems somethig went wrong between selection from DB and displaying of them. And this something can be only in theme files.

I would be glad to help you more with this, but support here is responsible only for the correct plugin work. Please, check the issue in the template file that provides displaying of posts.

Hi Stepasyuk,

Great plugin!

When I attempt to apply multiple filter options on my website, the SEO rules do not approve them, resulting in the content being flagged as “noindex” by search engine robots. Is there any solution to this?

<meta name=’robots’ content=’noindex, nofollow’ />

Hi kaioumabdul

Thank you for using the plugin.

If you mean situation, when you select several terms of the same filter (for example Color blue + yellow simultaneously) it is expected behavior that such page has “noindex” status. This was done to avoid sanctions from Google for search spam.

Because people very rarely use search keyphrase like “buy blue or yellow woman dress”. Usually “yellow woman dress” or “blue woman dress”. Also if to allow to index such combinations there will be a lot of automatically generated pages with “index” status. And Google can lower the rating of such a site.

But if you are sure that you want to allow to index such pages, you always can change page indexing status using hook ‘wpc_seo_robots’ to modify the robots meta tag value.

Hi Stepasyuk,

Great plugin!

I am trying to rename the default ”- Select X -” option on a dropdown filter. Could you please let me know if there’s a better solution that doesn’t require JS?

<script>

// hide the filter element initially, so that default isn’t visible

document.querySelector(’.wpc-filters-scroll-container’).style.display = ‘none’;

// wait for the page to finish loading, because this script is at the end of body

window.addEventListener(‘load’, function() { var optionToRename = document.getElementById(‘wpc-option-taxonomy-program-0’); optionToRename.textContent = ‘Everyone’; document.querySelector(’.wpc-filters-scroll-container’).style.display = ‘block’; });

</script>

Hi antoanst

Thank you for using Filter Everything PRO.

Sure. You don’t need JS at all and there are several ways to change the string - Select %s - in a dropdown to your own:
1) To translate it with the Loco translate plugin or other software if you use not-English language on your site.
2) To use theTemplates overriding feature https://filtereverything.pro/resources/templates-overriding/ to override the dropdown.php template and replace the string.
3) To use hook ‘wpc_dropdown_default_option‘ if you are familiar with PHP development.

Please, choose the way what is most preferable for you. Thank you. Regards.

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.

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