SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast
    Join Date
    May 2007
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    WP-PageNavi not working

    Hello, I've set up WP-PageNavi, but when I click to go to the next page, the same posts show up as the first page.

    Here's the website:
    http://www.dealoverflow.com/

    The navigation is at the bottom. It doesn't seem to go to the next page, though. Could this be a permalinks issue?

  2. #2
    SitePoint Enthusiast fatihturan's Avatar
    Join Date
    Aug 2008
    Location
    Turkey
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think if you use this code snippet before your loop then your problem will be solved:

    PHP Code:
    <?php $paged intval(get_query_var('paged'));
    if(
    $paged == 0) {
    $paged 1;
    }
    query_posts("paged=$paged"); ?>
    Web & User Interface Designer Co-Founder at Unicrow

  3. #3
    SitePoint Enthusiast
    Join Date
    May 2007
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by fatihturan View Post
    I think if you use this code snippet before your loop then your problem will be solved:

    PHP Code:
    <?php $paged intval(get_query_var('paged'));
    if(
    $paged == 0) {
    $paged 1;
    }
    query_posts("paged=$paged"); ?>
    Unfortunately the problem still occurs.

  4. #4
    SitePoint Enthusiast fatihturan's Avatar
    Join Date
    Aug 2008
    Location
    Turkey
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can you post your loop or your template in here?
    Web & User Interface Designer Co-Founder at Unicrow

  5. #5
    SitePoint Enthusiast
    Join Date
    May 2007
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    			<?php
    				query_posts('showposts=16');
    			?>
    			<?php if (have_posts()) : ?>
    				<?php $first = true; ?>
    				<?php while (have_posts()) : the_post(); ?>
    				blah blah blah
    			<?php else : ?>
    				<h2 class="center">Not Found</h2>
    				<p class="center">Sorry, but you are looking for something that isn't here.</p>
    				<?php include (TEMPLATEPATH . "/searchform.php"); ?>
    		
    			<?php endif; ?>

  6. #6
    SitePoint Enthusiast fatihturan's Avatar
    Join Date
    Aug 2008
    Location
    Turkey
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can you try this code snippet?

    Code PHP:
    <?php $paged = intval(get_query_var('paged'));
    if($paged == 0) {
    	$paged = 1;
    }
    query_posts("showposts=16&paged=$paged"); ?>
     
    <?php if (have_posts()) : ?>
    	<?php $first = true; ?>
    	<?php while (have_posts()) : the_post(); ?>
    	blah blah blah
    <?php endwhile : //you forgot this line for closing loop? ?>
     
    <?php else : ?>
    	<h2 class="center">Not Found</h2>
    	<p class="center">Sorry, but you are looking for something that isn't here.</p>
    	<?php include (TEMPLATEPATH . "/searchform.php"); ?>
    <?php endif; ?>

    If this codes doesn't solve problem then you can ask your question plugin developer: Lesterchan.net
    Web & User Interface Designer Co-Founder at Unicrow


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •