所以,我现在正在建设一个以砖石为主题的建筑工地。当主题是股票,砖石工作,然而,因为我已经开始修改主题,我现在注意到错误“找不到变量imagesLoaded”。我会回到股票和重新制作主题,我的定制小心检查错误后,但这将是太长的时间。我想我应该在这里问一下,最近是否还有其他人遇到过这个问题。我知道这里还有一个类似于此的问题,我试着用它编写代码,但不太清楚到底该如何处理它。可能是我在header.php中加载了header.php,用于定制的jQuery下拉菜单吗?functions.php文件中的砖石代码如下所示:
if ( ! is_admin() ) :
// Deregister built in masonry since it is old version 3.
wp_deregister_script( 'jquery-masonry' );
// Load imagesLoaded plugin.
wp_enqueue_script( 'imagesLoaded', get_template_directory_uri() . '/js/imagesloaded.pkgd.min.js', false, null, true );
// Load newer masonry.
wp_enqueue_script( 'masonry', get_template_directory_uri() . '/js/masonry.pkgd.min.js', array( 'imagesLoaded'), null, true );
endif;非常感谢
发布于 2015-12-09 16:48:23
我发现,通过删除footer.php文件,我删除了一个指向wp_footer()函数的链接;该函数实质上是这样做的:
function wp_footer() {
/**
* Print scripts or data before the closing body tag on the front end.
*
* @since 1.5.1
*/
do_action( 'wp_footer' );
}https://wordpress.stackexchange.com/questions/211280
复制相似问题