在header.php添加:

<script type='text/javascript' src='<?php echo TEMPLATE_URL; ?>js/FancyZoomHTML.js?ver=1.0.0'></script>
<script type='text/javascript' src='<?php echo TEMPLATE_URL; ?>js/phzoom.js?ver=1.0.0'></script>
之后添加<body onLoad="setupZoom()>属性:

<body onLoad="setupZoom();" class="home page page-id-207 page-template-default animation_image_zoom enabled_back_to_top active-lighbox  active-emphasize-first-p boxed wpb-js-composer  vc_responsive">

演示:Demo   JS直接F12吧