• When I click on the page 2 in navigation it change the link in command line (https://www.thinqbali.com/bali-blog/page/2/) but doesn’t show new posts, leave me with the same from the page 1.

    page for exam – https://www.thinqbali.com/bali-blog/
    – code for this page below:

    <?php
    /*
    Template Name: Posts Theme
    */
    ?>
    <?php get_header(); ?>

    <?php {
    query_posts(‘showposts=25&paged=’.$page.’&posts_per_page=25′);
    };?>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div class=”posts”>
    <h2>” title=”<?php the_title(); ?>”><?php the_title(); ?></h2>
    <?php the_excerpt(); ?>
    </div>
    <div class=”posts-speech”></div>
    <?php endwhile; ?>

    <?php else : ?>

    <?php include (TEMPLATEPATH . ‘/404.php’); ?>

    <?php endif; ?>

    <?php if(function_exists(‘wp_pagenavi’)) { wp_pagenavi(); } ?>

    <?php get_sidebar(”); ?>
    <?php get_footer(); ?>

Viewing 1 replies (of 1 total)
  • im not sure if and where you are actually getting the $page variable (?):

    you could try and add a line before query_posts()
    so that the code looks like this:

    <?php
    $page = (get_query_var('paged')) ? get_query_var('paged') : 1;
    query_posts('showposts=25&paged='.$page.'&posts_per_page=25'); ?>

Viewing 1 replies (of 1 total)
  • The topic ‘page navigation doesn’t work’ is closed to new replies.