Specifying ‘id’ on fe_widget shortcode isn’t working
-
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.
The topic ‘Specifying ‘id’ on fe_widget shortcode isn’t working’ is closed to new replies.