1

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 end 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"

3
  • Since this done with AJAX, have you tried using Firefox + Firebug? Load it up and then do a shift-Reload. Check the FB console for what went out and what came back. That gives you a start one where the problem might be. Commented Jun 15, 2011 at 3:58
  • I tried that and the debug was ["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"]. Commented Jun 17, 2011 at 9:53
  • OK, so what happened between the load() and the error? Sometimes you can just single-step through it and see the error happen, or sometimes you can place breakpoints at interesting places and watch as the values change. Also, what do the server logs look like for this event? Commented Jun 17, 2011 at 17:47

2 Answers 2

1

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.

Sign up to request clarification or add additional context in comments.

Comments

0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.