Support » Themes and Templates » Another Pagination Problem

  • Ok, so I’ve seen a LOT of pagination problems, but haven’t been able to find a problem exactly like mine or a solution that I was able to get to work.

    On my page,, the “older posts” and “newer posts” links don’t work. What I’ve found is that they link to “…/page/2” “…/page/3” etc, and none of these seem to work with the theme I’m using (Portfolio Press).

    What does work, however, is if I edit the URL to be “…/?paged=2” and so on. The easy fix seems to be to reformat the variable that creates that link, but I cannot figure out for the life of me how to do that.

    I’m sorry, I’m dumb. Open to other suggestions too.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The most common reason for such issues is the usage of query_posts to filter some of the content you render on the index page.

    If that’s the case, make sure you attach the existing query string to the new ones you’re using. For example, if you’re excluding a category, you should do it like that:

    $posts = query_posts($query_string . '&cat=-3');

    Hmm, not filtering anything. If I’m not mistaken, the section of code that needs to be altered is here under theme functions:

    function portfoliopress_content_nav() {
    	global $wp_query;
    	if (  $wp_query->max_num_pages > 1 ) :
    		if (function_exists('wp_pagenavi') ) {
    		} else { ?>
            	<nav id="nav-below">
    			<h1 class="screen-reader-text"><?php _e( 'Post navigation', 'portfoliopress' ); ?></h1>
    			<div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'portfoliopress' ) ); ?></div>
    			<div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&rarr;</span>', 'portfoliopress' ) ); ?></div>
    			</nav><!-- #nav-below -->
        	<?php }

    That’s the only place I can seem to find it calling for next and previous posts, but I can’t figure out what to do with that to fix it.

    I’m still stuck on this. I tried a few other solutions to similar problems, but nothing seemed to work.

    Hello thegrrrague. Working with pagination on the homepage is a bit tricky because showing posts on home page is considered a custom loop. Thus, you need to deal with pagination by yourself.

    You can read my previous thread about this problem:

    And don’t forget to checkout this url to deal with custom pagination:

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Another Pagination Problem’ is closed to new replies.