I'm trying to add infinite scrolling to a custom page i've created on my WP install but it's not working. The message saying that the posts are being fetched appears, but then it says i've reached the e开发者_如何学Gond and no posts appear.
I've tested this on the homepage and it's working. Could it be because i'm using a custom query on this page? The query is:
$paged = get_query_var('paged') ? get_query_var('paged') : 1;
$args = array(
'v_sortby' => 'views',
'v_orderby' => 'desc',
'post_type' => 'jogos',
'paged' => $paged
);
query_posts($args);
Any help regarding this problem is appreciated, Thank you!
Update: i've enabled Debug and got this from chrome's console:
["heading into ajax", Array[2] ] jquery.infinitescroll.js:121["Using HTML via .load() method"] jquery.infinitescroll.js:121["Error", "end"] jquery.infinitescroll.js:121["Binding", "unbind"]
.
The difference between the other page is that the "Error", "end" doesn't appear but instead the "contentSelector"
I had a problem with this same thing, and for me the problem was that I was using custom styles and div class. Be sure that your custom page has the same class selector as that listed for your infinite scroll configuration.
Do you have a link to where this is happening? I have a feeling this is because infinite scroll's AJAX request is returning a 404. The issue would be in the path for the next page, but I'd need to see the page to be able to debug it. Thanks.
精彩评论