お世話になっております。
Photo Gallery用に自作テーマを作成しました。
http://yesdeafcan.wp.xdomain.jp/
画像をクリックするとズームインにアップしますが、画像が表示されません。
エラーメッセージ The requested content cannot be loaded. Please try again later.
外部JavaScript内のimgへのパスが合ってないようです。
main.jsの250行あたり
this.originalImg = document.createElement('img'); this.originalImg.className = 'original';
ネットで検索しましたところ、
「外部JavaScript内のimgへのパスについて」
https://ja.forums.wordpress.org/topic/7139?replies=8
これを参考に修正しました。
footer.php内 <?php echo '<script type="text/javascript">var templatePath = "' . get_template_directory_uri() . '";</script>'; ?> <script src="<?php echo get_template_directory_uri(); ?>/js/main.js"></script>
main.jsの250行あたり this.originalImg = document.createElement('templatePath + '/img/‘); this.originalImg.className = 'templatePath + '/img/original/';
結果はダメでした。どこがいけなかったのでしょうか?
アドバイスを宜しくお願いします。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/06/29 08:46
2016/06/29 08:53
2016/06/29 12:46
2016/06/29 12:59
2016/06/29 13:10
2016/06/29 13:29
2016/06/30 00:30
2016/06/30 17:04