query_posts() returning same results with ajax
-
I have a page that that is run on ajax. When the user selects to see older posts jquery calls the load() function and loads the next set of posts in a specified section.
my jquery:
jQuery('.moreButton a, .backButton a').live('click', function(e){ e.preventDefault(); var link = jQuery(this).attr('href'); jQuery('.blogDisplay').fadeOut(200).load(link + ' .blogDisplay', function(){ jQuery('.blogDisplay').fadeIn(800); makeThumb();}); });
the section I have in the index:
<?php query_posts('cat=-132'); if (have_posts()):?> <?php while (have_posts()) : the_post(); ?>
when the page loads first it shows the correct set of posts. when I choose to see the next set it always shows the same first set. However, when I remove the change in query_posts() to show all the posts it woks perfectly.
Any ideas?
[Bump deleted – They’re not allowed on these forums – MOD.]
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘query_posts() returning same results with ajax’ is closed to new replies.