You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is one thing with the Cookie Notice plugin that took me a while to figure out. When I've installed and activated it Cookie Notice should basically work out of the box and display a cookie notice right on page load. But it has not. The odd thing was that the markup of the cookie notice was showing but the display:nonewasn't removed. Then i realized that Cookie Notice requires jQuery. And if you are like me and have deregistered jquery on the front-end
then you have no show of the notice. and i've noticed several issues on the plugin support forum stating that the plugin isn't showing like in my described case. might be cuz of the same reason.
The text was updated successfully, but these errors were encountered:
rpkoller
changed the title
Add a note to the Cookie Notice description in plugin repository on wordpress.org that jQuery is a dependency
Add a note to the Cookie Notice description in the plugin repository on wordpress.org that jQuery is a dependency
Jun 3, 2018
Normally, there is no need to remove jQuery from front-end, because WordPress core does not enqueue it by default (it only registers it for plugins/theme to declare their JS assets as jQuery dependencies). So jQuery should be enqueued only if a plugin (or theme) says it needs it. Like Cookie Notice plugin properly does here.
I know that some themes enqueue jQuery explicitly, even if it's not actually needed by another JS asset. In such case, I would recommend using wp_dequeue_script instead of wp_deregister_script as the latter effectively says there is no jQuery available as dependency (and breaks as soon as there is a plugin that needs it as it was in your case).
There is one thing with the Cookie Notice plugin that took me a while to figure out. When I've installed and activated it Cookie Notice should basically work out of the box and display a cookie notice right on page load. But it has not. The odd thing was that the markup of the cookie notice was showing but the
display:none
wasn't removed. Then i realized that Cookie Notice requires jQuery. And if you are like me and have deregistered jquery on the front-endthen you have no show of the notice. and i've noticed several issues on the plugin support forum stating that the plugin isn't showing like in my described case. might be cuz of the same reason.
The text was updated successfully, but these errors were encountered: