-2
所以朋友,我想在我的WordPress主題中使用prettyPhoto,但它根本不工作。它的兩個文件 - prettyPhoto.css和jquery.prettyPhoto.js在header.php文件中正確鏈接。prettyPhoto不工作在我的wordpress主題
這是我的header.php文件中的文件的鏈接 -
<link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/js/prettyPhoto/css/prettyPhoto.css" type="text/css" media="screen" title="prettyPhoto main stylesheet" charset="utf-8" />
<script src="<?php bloginfo('stylesheet_directory'); ?>/js/prettyPhoto/js/jquery.prettyPhoto.js" type="text/javascript"></script>
請讓我知道如果這個問題是由於不使用wp_enqueue_script()。
而且我這是怎麼鏈接的圖像與prettyPhoto使用 -
<a title="test image" href="images/new-image.png" rel="prettyPhoto[]"><img src="images/new-image.png" alt="Some Alternate Text" /></a>
當我點擊圖像,它不prettyPhoto打開。
footer.php或index.php文件有什麼問題,如果我必須將代碼放在編輯器中?有一件事,我把漂亮的照片的額外代碼放在header.php文件中... – Umar
你有沒有試過爲二十一個主題啓用prettyphoto – defau1t
我已經創建了我自己的主題,所以我不想在二十一... – Umar