###前提・実現したいこと
初心者で申し訳ありません。
WP4.7.2でImageGallery(ChangePhoto)という画像クリックで切り替わるギャラリーを設置したいです。
###発生している問題・エラーメッセージ
wordpressを4.4から最新の4.7.2にアップグレードしたところ、
ImageGallery(ChangePhoto)というjQueryで切り替えていたギャラリーが動作しなくなってしまいました。
chromeのデベロッパーツールでもエラーにはなっていなそうで困っております。
PHP
<div class="item-gallery-main row"> <?php the_post_thumbnail( 'Large', array('id' => 'MainPhoto') ); ?> </div> <div class="item-gallery row"> <ul class="item-gallery-item"> <li><?php the_post_thumbnail( 'Large', array('class' => 'ChangePhoto') ); ?></li> <?php if(get_post_meta($post->ID, 'cf-all-images', true)): ?> <?php while(the_repeater_field('cf-all-images')): ?> <li><img src="<?php the_sub_field('item-img'); ?>" alt="<?php the_title(); ?>" class="ChangePhoto" /></li> <?php endwhile; ?> <?php endif; ?> </ul> </div>
JS
//item-gallery $(function(){ $("img.ChangePhoto").click(function(){ var ImgSrc = $(this).attr("src"); var ImgAlt = $(this).attr("alt"); $("img#MainPhoto").attr({src:ImgSrc,alt:ImgAlt}); $("img#MainPhoto").hide(); $("img#MainPhoto").fadeIn("slow"); return false; }); });
###試したこと
WPのダウングレードを試みましたがエラーになり断念しました。
###補足情報(言語/FW/ツール等のバージョンなど)
アップグレード前は動いていました。
使用しているプラグインは以下で、それぞれバージョンは最新です。
+.html on PAGES
+Admin Post Navigation
+Advanced Custom Fields
+Advanced Custom Fields: Repeater Field
+Akismet Anti-Spam (アンチスパム)
+Custom Post Type UI
+EWWW Image Optimizer
+Google XML Sitemaps
+NextGEN Gallery
+Parent Category Toggler
+Redirection
+SiteGuard WP Plugin
+WP Multibyte Patch
+WP-DBManager
+画像ウィジェット
どうぞよろしくお願いいたします。
あなたの回答
tips
プレビュー