简体   繁体   中英

hide jQuery library only from product detail page Wordpress (WooCommerce)

<script type="text/javascript" 
    src="<?php echo get_template_directory_uri(); ?/js/jquery-1.7.2.min.js">
</script>

I want to remove the code above from WordPress's product single page. This is creating error with the home page flex slider. How can I prevent it from loading only on the product detail page?

To Check we are on single product there is one condition:

is_product()

By using this you can hide the jquery from details page.

There are another option as well, to sort out the jquery conflict issue and you don't need to add the above condition :)

Thanks

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM