1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Why my Wordpress Pagination not working...

Discussion in 'Content Management' started by mrkool, Nov 15, 2011.

  1. #1
    Why my wordpress pagination is not working, If I disable Pretty link "%postname%/", It works fine... here is my code.

    
    
    <?PHP header();
    
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    query_posts( 'cat=3&paged='.$paged);
    
        <?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?>
        <h1><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h1>
        <?php endwhile; ?>
            
            <?php if(function_exists('wp_pagenavi')) { ?>     
            <div id="page-navigator">
            <?php wp_pagenavi(); ?>
            </div>     
            <?php } else { // Otherwise, use traditional Navigation ?>     
            <div class="navigation">     
                <div class="floatleft">
                <?php next_posts_link('&laquo; Next') ?>
                </div>     
                <div class="floatright">
                <?php previous_posts_link('Previous &raquo;') ?>
                </div>     
            </div>     
            <?php } ?>
        <?php endif; ?>
    
    PHP:

    Output is fine, I can see the pages numbers but When I click on page not 2 or 3 it redirects me to the same page.

    I removed WPagenavi code and just use wordpress pagination code but result is same, it redirects me to the same page with same results...

    Where I am wrong please help me, It's urgent....
     
    Last edited: Nov 15, 2011
    mrkool, Nov 15, 2011 IP