WordPress.org

Ready to get started?Download WordPress

Forums

WP-PageNavi
PageNavi Shows 404 Error (1 post)

  1. jpsworld
    Member
    Posted 2 years ago #

    [ Moderator Note: Please post code or markup snippets between backticks or use the code button. Or better still - use the pastebin ]

    Hi,

    There is a bug in my code, while applying pagination.
    I used to fix it with available resources in Googling...
    But the bug will remains the same.

    I use the category-project.php page for this one.
    I just add my Code here: Any one can help me.

    <?php
                $paged = get_query_var( 'page' ) ? get_query_var( 'page' ) : 1;
                $args = array(
                'post_type' => 'post',
                'posts_per_page' => 2,
                'cat' => 6,
                'paged' => $paged,
                'caller_get_posts'=> 1
                );
                query_posts( $args );
                $loop=null;
                $loop = new WP_Query($args);
                while ($loop->have_posts()) : $loop->the_post();
                ?> 
    
                <div class="multi-project">
    
                <div class="multi-project-img"> <a>">
                <img src=" <?php echo catch_that_image()?>" width="120" height="80" />
                </a> </div>
    
                <div class="multi-project-meta">
                <div class="head"><a>">
                <?php the_title()?>
                </a></div>
                <div class="desc">
                <?php  content_limit(200); ?>

    Client :

    <?php the_field('client'); ?>

    Location :

    <?php the_field('location'); ?>
                </div>
                </div>
                <!-- .project-meta -->
                </div>
                <?php endwhile; ?><!--end custom loop-->
                <div id="pagination">
                <?php
                if(function_exists('wp_pagenavi'))
                { wp_pagenavi( array( 'query' =>$loop )); 
    
                }
                wp_reset_query();
                ?>

    Thanks in Advance.

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic