• Hi there,

    I’m using a plugin to generate AJAX pagination on my wordpress site. However, I have a problem where it works fine on the homepage, however under the custom post type archives it throws up the wrong results – it’s just pulling results as if it were still the homepage.

    Here’s a link to the site: http://chunk.wearegrove.co.uk/

    If you click on the news section and click load more you’ll see what I mean, and for some reason it doesn’t even work on the games section. It gets it correct that the news section has 2 pages worth of results, it just doesn’t load the correct items when it appends the second page.

    At the start of each post type archive I have:

    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    
    $args=array(
       'post_type' => 'news',
       'paged'=>$paged);
    query_posts($args);
    
    if ( have_posts() ) :

    Each of those has the relevant post type substituted in for the relevant archive. I’ve modified the plugin slightly – and you can find it here

    Any help you could provide on this would be great as this project is due for tomorrow and I currently want to throw myself out the nearest window.

    Many thanks, Chris

The topic ‘[Plugin: AJAX Pagination (Twitter Style)] Loading wrong posts’ is closed to new replies.