2012-06-16 39 views
-1

我已经升级我的网站到wordpress 3.4,并打破几乎所有使用jQuery的插件。我认为原因是它在wp-head之后加载wp-includes/jquery文件。WordPress的3.4升级创建jQuery问题

请让我知道的任何解决方案,为这个..

感谢和问候

+1

add_action('wp_head', 'load_scripts'); // to load jquery on the font page add_action('admin_head', 'load_scripts'); // to load jquery on the admin page function load_scripts(){ wp_enqueue_script('jquery'); //insert all other wp_enqueue_scripts() calls here } 

详细信息您需要向我们提供更多的线索。是否有JavaScript错误?你能把我们链接到网站吗? –

+0

WordPress 3.4没有任何问题,因为它在包括我的许多站点中都能很好地工作。你应该检查你的主题如何处理jQuery的主题。 WordPress 3.4在'wp_head'上加载脚本好吧... – AriePutranto

+0

Hello guys ... 看看这个网页。 jQuery是由wordpress标题定义的。 这是造成问题的东西,我想要的是相同的.. http://rjmultimedia.in/beckysfund/ 只有其中一件事正常工作,无论是前端还是仪表板。 –

回答

0
add_action('wp_head', 'load_scripts'); // to load jquery on the font page 
add_action('admin_head', 'load_scripts'); // to load jquery on the admin page 
function load_scripts(){ 
wp_enqueue_script('jquery'); 
//other scripts 
} 

另外,如果你知道这个插件,你可以在脚本列表中排队“jQuery的”明确。

+0

你好家伙... 看看这个网页。 jQuery是由wordpress标题定义的。 这是造成问题的东西,我想要的是相同的.. http://rjmultimedia.in/beckysfund/ 只有其中一件事正常工作,无论是前端还是仪表板。 –

+0

我确实使用了您的解决方案。现在它在前端很好,但仪表板不工作.. –

0

看来WordPress是现在载入中页脚的所有脚本 - 把你的脚本,有,它会工作正常

0

Subharanjan的回答是我正确的 - 因为是WebandSteak的。

我有一个自定义模式弹出,我在我的几个电子商务网站上使用,我发现我需要调用jQuery使用Subharanjan的方法强制jQuery排队在标题,但然后我不需要调用我的jQuery的功能,直到在footer.php中调用wp_footer()函数之后。

我足足写了这里我的解决方案,如果你需要一个更好的解释 - https://bitly.com/O6pBUN