我的Wordpress主题出现了一个奇怪的加载问题,仅在Chrome上出现,我在Safari和Firefox上进行了测试,内容一次加载完毕,但如果你在Chrome浏览器上快速向下滚动页面,它会显示空白区域,并在1秒后加载剩余内容,请访问http://xscoder.com/wp-demo/vintymag/
知道是什么导致了这种“闪烁”问题吗?
我还注意到,侧边栏在向下滚动时跟随内容,这是我在functions.php
文件,所以我不知道为什么会这样。。。
我的index.php
文件为空,因为我创建了page.php
调用页眉和页脚并承载主页所有内容的文件。在我的page.php
文件我调用了几个不同的查询,如下所示:
<?php get_header()
/*
Template Name: Home - Default
*/
?>
<?php
$query_latest_carousel = new WP_Query( array(
\'posts_per_page\' => 4,
));
// the Loop...
然后: <?php $query_featured_posts = new WP_Query( array( \'tag\' => \'featured\' ) );
// the Loop...
还有一个: // search for \'featured\' tag
$tags = wp_get_post_tags($post->ID);
foreach ( $tags as $tag ) {
if ($tag->name == \'featured\') {
$tag_id = $tag->term_id;
}
}
// query without \'filtered\' tag
$query_posts = new WP_Query(
array(
\'tag__not_in\' => array($tag_id),
\'posts_per_page\'=>-1,
)
);
// the Loop...
<!-- Sidebar-->
<aside class="col-md-4 sidebar_right">
<?php dynamic_sidebar(\'right-sidebar\'); ?>
</aside><!-- ./ Sidebar-->
<?php get_footer(); ?>
可能是因为同一页中有太多不同的查询?如果是的话,为什么我的网站在Firefox上运行得很好?任何帮助都将不胜感激,谢谢!