Override parent theme deregister

I have a parent theme that deregisters a script, in my case jquery. It does it like this:

function parent_enqueue_scripts() {
wp_deregister_script( ‘jquery’ );

[…]
}

However, in my child theme I want to use jquery in order for some plugins to work properly. I cannot simply name it jquery2, because plugins always seem to look for jquery spelled exactly like that.

I don’t want to override the parent function, because it also does a whole bunch of other stuff in that function, that could potentially be updated in the future.

So how do I “reregister” jquery, even though the parent theme deregisters it?

Read more here:: Override parent theme deregister

Leave a Reply

Your email address will not be published. Required fields are marked *