WordPress.org

Forums

[resolved] Problem with post pagination (3 posts)

  1. jvitorcarvalho
    Member
    Posted 3 years ago #

    Hi,

    I have a problem with the pagination of the posts of my site:

    http://www.jornaltribunalivre.com.br/cidades/brasil

    In my template I have the function

    <?php twentyeleven_content_nav( 'nav-above' ); ?>

    I have the option "Older posts" but when I click on the link I go to:

    http://www.jornaltribunalivre.com.br/cidades/brasil/page/2/

    But with the same posts. The function doesn´t load previous posts.

    Somebody could help me to solve this problem?

  2. vtxyzzy
    Member
    Posted 3 years ago #

    The query used in that template needs to include the 'paged=' parameter. You must set a variable based on the query and then add it to the parameters for query_posts.

    The exact coding will depend on how the query_posts is currently coded. In many themes, it is added like this example:

    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    query_posts("posts_per_page=10&paged=$paged");
  3. jvitorcarvalho
    Member
    Posted 3 years ago #

    Really thanks dude, you guide me to the solution. If anyone have this problem I suggest you to go:

    http://weblogtoolscollection.com/archives/2008/04/19/paging-and-custom-wordpress-loops/

Topic Closed

This topic has been closed to new replies.

About this Topic