Closed grappler closed 8 years ago
I am not familiar with Polylang, trying to understand your use case. Fragment Cache is not supposed to override if widget is showing overall, only to make its content come from cache instead of being dynamically generated.
Could you clarify how does it interfere with Polylang?
Sure, when Polylang is installed there is an option on every widget which allows you to define for which language the language should display.
At the moment when I first access example.com/en then the widget will be cached in English and so when I switch to example.com/de the English widget will show instead of the second German widget.
The same applies for menus.
Hmmm... Any idea why? I would guess $widget->id
collision maybe?
It is working. I am not sure what I was thinking back then. Closing
The reason for this change is that I am using Polylang and there are different widgets on the English page to the German page. Both use the same sidebar. This filter would allow me to hook into the filter and add the language to name so that only the widget for that specific language is shown.
Here is an code example