WordPress.org

Forums

WP-PageNavi
wp navi in my schedule (2 posts)

  1. kakajoe
    Member
    Posted 3 years ago #

    Im trying to make a schedule gig with a post, the post is limit to 3..and i have a 10 schedule gig..that why i need wp_navi, but somehow when i clicked the 2nd button, it turn back to my index and the url link is http://www.mydomain.com/page/2.
    I hope this image can help u, because my english is so bad :P
    ------
    http://www.slank.com/fbml/jadwal1.jpg
    ------

    and this is my code
    ---------

      <?php
      $jadwal = new WP_Query('post_status=future&category_name=jadwal&order=DESC&showposts=3');
      if ($jadwal->have_posts()) {
      while ($jadwal->have_posts()) : $jadwal->the_post(); $do_not_duplicate = $post->ID; ?>

    • <p><?php the_title(); ?></p>
      <p><?php the_time('F jS, Y') ?></p>
      <?php the_content(); ?>
    • <?php endwhile; } ?>
      <?php wp_pagenavi( array( 'query' => $jadwal ) ); ?>

    ------------------
    please help me..

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

  2. faspada
    Member
    Posted 3 years ago #

    Kakajoe:

    I'm having the same problem. Do not sleep at 3 days, trying to solve it. you got?

    <?php
    query_posts( array(
      'category' => basename(get_permalink()),
      'post_status' => 'publish,future',
      'paged' => get_query_var('paged')
    ) );
    
    if(have_posts()): while(have_posts()): the_post();
    ?>
    
    <h2><?php the_title(); ?></h2>
    <p><?php the_time('d/m/Y H:i');?></p>
    <hr />
    <?php endwhile; else: endif; ?>
    
    <?php
    wp_pagenavi();
    wp_reset_query();
    ?>

    When doing a query using 'post_status' => 'future', shows all pages, but only navigates to page 2.

    posts per page
    http://actmob.com/template100/?cat=3

    all posts
    http://actmob.com/template100/?cat=7

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic