WordPress.org

Ready to get started?Download WordPress

Forums

WP-Paginate
[resolved] pagination links not working (5 posts)

  1. Libin
    Member
    Posted 2 years ago #

    I am using the child theme of twenty eleven. I had installed the Wp-Paginate plugin as per the guidance and changed the functions.php

    But when I click the pagination number, the link will change to http://mysite.com/page/2/. But it shows the page 1 only.

    My site link

    Do I need to change anything on the index.php? Please help me.

    http://wordpress.org/extend/plugins/wp-paginate/

  2. alchymyth
    The Sweeper & Moderator
    Posted 2 years ago #

    if you have any custom queries in the template, make sure to integrate the 'paged' parameter;

    http://codex.wordpress.org/Class_Reference/WP_Query#Pagination_Parameters

  3. Libin
    Member
    Posted 2 years ago #

    Hey,

    The only custom query I'm using in index.php is
    <?php query_posts('cat=-35'); ?>

    How to integrate that?

  4. alchymyth
    The Sweeper & Moderator
    Posted 2 years ago #

    try:

    <?php global $query_string;
    query_posts($query_string .'&cat=-35'); ?>

    http://codex.wordpress.org/Function_Reference/query_posts#Preserving_Existing_Query_Parameters

    related: http://codex.wordpress.org/Function_Reference/query_posts#Pagination

    i.e. alternatively try:

    <?php query_posts( array( 'cat' => -35, 'paged' => get_query_var('paged') ) ); ?>
  5. Libin
    Member
    Posted 2 years ago #

    Hey Champ...

    That worked !!!

    <?php query_posts( array( 'cat' => -35, 'paged' => get_query_var('paged') ) ); ?>

    Thank You so much.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic