Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/77.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 无限滚动wordpress不工作_Php_Jquery_Ajax_Wordpress_Infinite Scroll - Fatal编程技术网

Php 无限滚动wordpress不工作

Php 无限滚动wordpress不工作,php,jquery,ajax,wordpress,infinite-scroll,Php,Jquery,Ajax,Wordpress,Infinite Scroll,我正在尝试使用Wordpress的插件。我设置了它,但它不起作用 设置屏幕: 模板文件 <div id="posts-wrapper" class="row main"> <?php $counter = 1; ?> <?php if ( have_posts() ){ while ( have_posts() ){ the_post(); ?> <?php $url = wp_get_attachment_image_src( get_pos

我正在尝试使用Wordpress的插件。我设置了它,但它不起作用

设置屏幕:

模板文件

<div id="posts-wrapper" class="row main">
<?php $counter = 1; ?>
<?php if ( have_posts() ){ while ( have_posts() ){ the_post(); ?>
    <?php $url = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'large' ); ?>
    <div class="single-post <?php if( $counter == 5 ) { echo "col-xs-12 col-sm-12 col-md-8 col-lg-8"; } else { echo "col-xs-12 col-sm-6 col-md-4 col-lg-4";} ?>">
        <div class="thumbnail">
            <div class="category-wrapper"><?php the_category(', ');?></div>
            <a class="href-overlay" href="<?php the_permalink(); ?>"><div class="wrapper">
                <div class="<?php if( has_term( 'hot', 'hot', $post->ID ) ){ echo "inside inside-hot"; } else { echo "inside";} ?>"><div class="image-cover" style="background-image: url(<?php echo $url[0]; ?>)"></div></div>
            </div></a>
            <div class="post-wrapper">
                <p class="post-created-by">Napisane przez <strong><span class="special"><?php echo get_the_author(); ?></span></strong> | <i class="glyphicon glyphicon-comment"></i> <?php comments_number( '0' , '1' , '%' ); ?></p>
                <h2 class="post-title"><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
            </div>
        </div>
    </div>
<?php $counter++ ; ?> 
<?php }else{ ?>
    <p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
<?php } ?>
</div>

<div id="paginacja">
    <?php next_posts_link('wczytaj więcej &raquo;')?>
</div>


你有javascript错误吗?请在第二行的
$counter=1
末尾加一个分号,以便让我们知道,当我点击按钮时,它不起作用的确切含义是什么?它将我重定向到第二页。它不会加载更多的帖子。我没有任何javasript错误ProTip:没有?当我们第一次提出无限卷轴时,它曾一度很棒,但后来发现分页实际上要好得多,因为它的行为是确定性的。人们真正喜欢的东西,与无限滚动相反,无限滚动使您无法再找到上次发现的内容。您是否发现任何javascript错误?请在第二行的
$counter=1
末尾加一个分号,以便让我们知道,当我点击按钮时,它会将我重定向到第二页,这到底是什么意思。它不会加载更多的帖子。我没有任何javasript错误ProTip:没有?当我们第一次提出无限卷轴时,它曾一度很棒,但后来发现分页实际上要好得多,因为它的行为是确定性的。人们真正喜欢的东西,而不是无限卷轴,它使你不可能再找到你上次发现的东西,再也找不到了。