Code

Discussion on Filter Everything | WordPress/WooCommerce Product Filter

Discussion on Filter Everything | WordPress/WooCommerce Product Filter

Cart 15,692 sales
Recently Updated

Stepasyuk supports this item

Supported

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

8970 comments found.

Hello. Thanks for the plugin!

There are not enough additional variables in the SEO Rule to describe categories for me. There’s only ‘site_title’ and ‘page_number’. How to add a Custom Fields of category to the SEO rule?

Hello pavelf7

I think you can try to add it with ACF plugin and on the page, where you want to display it, you can get field’s value by SEO Rule ID. To get the SEO Rule ID you can use next code:
if( class_exists( 'FilterEverything\Filter\Pro\PluginPro' ) ){
    $seoFrontend = \FilterEverything\Filter\Container::instance()->getSeoFrontendService();
    $seoRulePostId = $seoFrontend->get( 'seoRulePostId' );

    var_dump($seoRulePostId);
}

In which file should I insert this code? do I need to change something in the code?

Hello pavelf7

If you are not familiar with PHP you have to ask or hire a developer to help you with this. Unfortunately such development questions are not included in the plugin support here on CodeCanyon. I would be glad to help you with this for example for extra payment, but unfortunatley I have not time for such service.

Thank you. Regards.

Hello, i have same problem like man before me, I am using Collapse Filters Widget on Mobile devices. I want it to be closed on the mobile device after the filter on a new page. Now on initial page is closed but after the filtering it is open.

Thanks

Hello ilija1973

Thank you for using Filter Everything PRO.

In general custom coding is not provided under CodeCanyon item support policy, but as it requires less than 10 minutes of my time I’m not against to provide it. Please, add in the Filters -> Settings -> Experimental – Custom CSS next code:
body.wpc_show_open_close_button .wpc-filters-widget-content.wpc-opened{
    display: none;
}

This should help you :-)

Hello, I’m Sébastien from Polylang Pro and we have a customer in common which can’t make working your plugin with ours… The issue is your filters are working well with Polylang, but when the customer adds Polylang Pro, then it stops working. The line in your code which is preventing it to work is https://plugins.trac.wordpress.org/browser/filter-everything/trunk/src/wpc-third-party.php#L441 Why do you return false if Polylang Pro detected ? There’s surely a reason, and I invite you to contact us through https://polylang.pro/support/ I’m sure we’ll find a solution to make our both plugin work together. Hope to hear news from you soon. Regards

Hello sebastienserre

I’m sorry for the late response.

In general the main problem is not in this function. From my side it looks like the main problem is in the hook ‘pll_get_post_types’ that often does not work.

Here is example from your documentation:
add_filter( 'pll_get_post_types', 'add_cpt_to_pll', 10, 2 );

function add_cpt_to_pll( $post_types, $is_settings ) {
    if ( $is_settings ) {
        // hides 'my_cpt' from the list of custom post types in Polylang settings
        unset( $post_types['my_cpt'] );
    } else {
        // enables language and translation management for 'my_cpt'
        $post_types['my_cpt'] = 'my_cpt';
    }
    return $post_types;
}
But in fact it did not work for my customer “Huzebio” and I changed it to
function flrt_add_cpt_to_pll( $post_types, $is_settings ) {
    if ( $is_settings ) {
        $post_types[ FLRT_FILTERS_SET_POST_TYPE ] = FLRT_FILTERS_SET_POST_TYPE;
    }
    return $post_types;
}

But it seems it depends from the Polylang PRO version and in dependancy from it I have to use first or second code example.

My goal is to make post type ‘filter-set’ translatable post type to allow users to create Filter Sets in accordance with languages on their sites. So my question is next – how to make the ‘filter-set’ post type always translatable in Polylang PRO?

Please, let me know. Thank you. Regards.

Hello, Could you please contact us at https://polylang.pro/support ? We’ll check how to help you the best to solve this issue once for all. Regards

Hello sebastienserre

I tried, but the form requires Polylang PRO license key ) Is there any other way to contact with you without this key?

I’ve already asked about the key in our common customer that faced with the issue.

Regards.

Hi,

Your plugin looks great !

However i’m a bit worried with all extra url created with the filters, as they would have very low value for me.

Is there an option to disable links for the facets ?

Thanks

I think i get it.

If i play with “Indexing depth” and “Indexing filters”, i get meta robots noindex nofollow on specific pages, so i can disable indexing attributes not very useful for SEO.

If there is more that i should know, thanks to tell me :)

Thanks

Your plugin is really easy to use, congratulations !

I just have 2 questions : – Would it be possible to add a rel=”nofollow” for links to “noindex” pages ? – Is it possible to display a range for a product attribute ? (it’s greyed out as it is)

Thanks :)

Hello DailyLost

Thank you for purchasing the plugin and for your warm words about it.

1. You can add rel=”nofollow” attribute to all filter links using hooks Term HTML hooks. Please, see here more info about them – https://filtereverything.pro/resources/hooks/#term-html-hooks But these hooks do not allow you to understand what links are indexable and what are not. So you have choice to add it to all links or do not add at all.

Optionally you can replace all permalinks with GET-style variables in URLs. As it is in Free version of the plugin. For example ?color=yellow&size=large instead of /color-blue/size-large/ To get this, just add in the functions.php of your active theme next code:
define( 'FLRT_PERMALINKS_ENABLED', false );

2. Yes. sure. You can create range filter for any taxonomy including product attribute. If it is greyed out it means you selected taxonomy that is not related with post type specified in Filter Set. Please, check these moments carefully.

Sorry one more question:

4.) When I enter a category through menü links (that I added through design > menü > available categories) the link will bring me to this url: /produkt-kategorie/zelte/

When I set the filter for the same category it brings me here: /shop/kategorie-zelte/

I have the problem that when I enter the category through menu link that still the filters are there that should be not there as I set them as not visible when empty. That one category is kind of selected then “greyed out” so that I cant switch it on or of but its like I´m on the main /shop page with all available filters. Problem is that then to many not necessary filters are in that selected category though menupoint. Why is that?

Thanks again.

Hello hwvaubel

I’m sorry, it would be much better if you will explain it on real example with links or maybe additional screenshots. Please, send me additonal information via PM. Because for the moment I’m not sure I understand you clear.

Thank you. Regards.

Hi, this request got resolved. I removed the filter “categories” and I am using another plugin just for showing up categories.

Filter Everything works I think as expected here. It shows the results of “categories” that contain products. What I wanted to achieve is that I will always have the parent category of the selected category with all childs listed and on click on them, get to the WooCommerce-URL (category based like ”/shop/zelte/trekkingzelte/”). Which is not really achivable with this plugin as it is not meant to do that I think.

So who wants to have a great plugin that can help with this is “Collapsing Categories” and with bit CSS you can also customize it to your needs. Below it I added the filterset, and voila!

Thx and regards

Great.

I’m glad that the issue is finally resolved :-)

Regards.

Hey, we use your plugin and ran into some small issues: 1. when I try to add another filter option, the attribute option is not clickable, it is grayed out. As you can see in the screenshot I have added the option producttags is not clickable, therefor I cannot add it as another option. What causes this? https://prnt.sc/VW7qcwtlS6vC 2. I have the option “Try to move sidebar to top on mobile devices” selected, but still the sidebar is displayed at the bottom. I tried changing the CSS to make the sidebar appear at the top, but without succes. Do you know how I can make it appear at the top ? We use the Struktur Creative Agency Theme

Hi davidt155

Thank you for your interest in Filter Everything PRO.

I have to say that support here is provided only for accounts who already purchased the plugin. Both issues can be solved.

If you use Free version, you can try to ask on WordPress forum and your question will be processed as soon as possible.

Thank you. Regards.

Hi,

thanks for your amazing plugin. I have some questions:

1.) When I add a filter “Taxonomy Numeric” with a Range option, where can I set this to collapsible “Folding”. The thing is we will have in our shop lot of range filters, so that this gets really not nice in design and long on the page… That would help us a lot.

2.) Any chance to set a filter as a link to that specific kategory page so that the options button in front is gone and on click on the word it would send the customer directly to the site. Would be nice for our “main” categories so the breadcrumps can then show the depth. I hope u know what I mean.

3.) I don´t know how to add “colors” to the color swatches option (activation through “Experimental” in Settings. I added the taxonomy which should show them but how to add the color? At the moment only a grey out picture is in front of the colors.

Thanks a lot for your support and great work! We really appreciate it!

Regards

Ok, thanks.

Who also needs this can add it to your child themes functions.php like this and it will then be shown:

function custom_admin_css() { echo '<style> /* Add CSS-Code after this line for Admin Area, Backend */ .wpc-field-collapse-tr { display: block !important; } </style>'; } add_action('admin_head', 'custom_admin_css');

Hope this helps.

Regards

Thank you hwvaubel

It is also an option to implement this CSS.

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

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