• Resolved M

    (@mxttsco)


    I’ve got the following code that I’m using to display the filters, and it works fine at the moment:

    echo do_shortcode('[fe_widget id="'.$productFilterId.'"]');

    $productFilterId is simply pulling the value from an ACF field that I have on the backend, so that I can easily set which filter set is being used.

    However, I’ve only ever used one filter set across my product categories. Now that I’m introducing some new filter sets (so that I can set specific filter sets for certain product categories) I’m finding that the ‘id’ attribute on the shortcode is being ignored. It’s just using the first filter set that I created even if $productFilterId has the ID for the new filter set I’ve created.

    I’ve tested this by manually entering the new filter set ID in the ‘id’ attribute as well – same result with the original filter set being used. This isn’t a cache issue as I’ve cleared everything. I removed the original filter set to test what would happen, and then the shortcode started using the new filter set. Upon restoring it, it began using that filter set again (despite the ID for the other filter set being added to the shortcode).

    Why is the ‘id’ attribute being ignored, if this is an option according to your documentation (https://filtereverything.pro/resources/shortcodes/)? Is it a known bug? Same result in the last couple versions of the plugin, so if it is an issue it has existed for a while.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support fesupportteam

    (@fesupportteam)

    Hi @mxttsco

    In the Free version, you can only display one filter set per post type. The ID parameter is serving the ordering purposes only. But since the free version can only display one filter set per post type it won’t make any difference.

    So the id = 2 and id = 3 won’t have any influence on which filter set it will show, only the one will be shown.

    In the PRO version, you can display as many filter sets on the page as you need, so you can use those IDs in shortcodes to set the needed order of filter sets to make sure you display in a certain place the needed one.

    Best Regards – Victor

    Thread Starter M

    (@mxttsco)

    Thanks for the response, but I’m not trying to show multple filter sets on the same page. I’m trying to show a different filter set on a certain category (by assigning a different ID to the shortcode on certain categories), but it shows the original (first) filter set that I created rather than the one I’m providing an ID for.

    Are you saying that in order to display a different (not multiple) filter set on certain categories I have to upgrade to pro? Seems a bit bizarre. Why even allow me to create multiple filter sets for the product post type on the free version if I’m not able to switch between them?

    Plugin Support fesupportteam

    (@fesupportteam)

    Hi @mxttsco

    The shortcode or the filter widget is not a filter itself, it is just a canvas where the filters will be displayed when you create a filter set and place it on your page.

    By default, in the Free version of the plugin, the filter set is placed on all archive pages of the needed post type. The rest of the filter sets for the same post type are ignored. They are more for creating “sorta” backups during experimenting, so you always can come back to the other one and check how you configured it earlier. Instead of writing down this all information. Also, if you decide to switch to the PRO version those filter sets would be there and you can place them on the needed pages. (But for this to happen you need to install the PRO without deleting the free version) because when you delete the plugin it will delete all of the filter sets as well.

    In the PRO version to display another filter set on the needed page, you need to configure the “Where to filter”, to the needed page/category/ and so on, and choose the needed query.

    You can check it more in the Quick Start – https://filtereverything.pro/resources/quick-start/

    To sum this up, if you want different filter sets on certain pages, yes you need a PRO version for that. 

    Of course, you can add all of the filters to one filter set in the Free version and use custom CSS in order to hide the non-needed filters on certain pages, if you want. There are always some workarounds, just the question is do you want to spend time on it or not.

    Best Regards – Victor

    Thread Starter M

    (@mxttsco)

    I’ll have to look at upgrading at some point then, because the workaround won’t work for what I need to do (as just hiding them using custom CSS will still mean that the filters are loading & adding onto the page load speed).

    Thanks for the fast responses.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Specifying ‘id’ on fe_widget shortcode isn’t working’ is closed to new replies.