• Having a weird problem on a site where the ‘previous posts’ at the bottom of a category template is only working on first click.
    i.e. domain.com/news – click ‘previous posts’ – loads the next 20 posts on domain.com/news/page/2

    However once on /page/2, when I click ‘previous posts’ again it loads /page/3 but just says ‘Sorry, no posts matched your criteria.’ There are definitely more posts as extending the query to display unlimited posts reveals them.

    This is whats being used:

    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    
    query_posts('order=DESC&orderby=date&category_name=news, film-projects, our-projects&posts_per_page=20&paged='.$paged);

    and at the bottom of the page:

    <?php next_posts_link('&laquo; Previous Entries') ?>
    
    <?php previous_posts_link('Next Entries &raquo;') ?>

    Any ideas?

Viewing 1 replies (of 1 total)
  • Not sure if this is the cause, but it looks odd to me that there are spaces in the query string between category slugs. Try removing the spaces.

Viewing 1 replies (of 1 total)
  • The topic ‘Previous Posts link only half working’ is closed to new replies.