Image Zoom WP plugin conflict with jQuery?

Image Zoom WP plugin conflict with jQuery?

If you have a WordPress theme that is very complex, is using jQuery scripts, installing plugins will be a pain because code conflicts will occur.

For example, this happens for “Image Zoom”, a simple plugin that provides a zoom-in feature for images.


This is the generated error:

“Your theme contains (i.e. in /home/folder/public_html/wp-content/themes/thene_name/header.php file) a hardcoded reference to the jQuery javascript library.
This reference may break the plugin. So, if the plugin does not work, please either delete this reference or move it just after the declaration.”

A simple fix is to save header.php as header2.php and replace < ?php get_header(); ? > with < ?php include('header2.php'); ? >.

And in header2.php, remove the unnecessary jQuery codes and links.

This will work.

However, if you really need those jQuery scrips even for single.php, you may need to find another solution.

Add a comment: